Working analysis

Survey questions

Q1. Before receiving this survey, did you know influenza is different from the stomach flu?

# Q1 summary
with(data2, table(Q1))
## Q1
##   No  Yes 
##  488 1664
q1 <- data2 %>%
  count(Q1)

# plot
ggplot(data2[!is.na(data2$Q1), ]) + geom_bar(mapping = aes(x = Q1, fill = Q1))

# alternative plot:
#ggplot(q1[!is.na(q1$Q1), ], aes(x = Q1, y = n, fill = Q1)) +
#  geom_bar(stat = 'identity', position = position_dodge())


# by gender, PPGENDER
with(data2, table(PPGENDER, Q1))
##         Q1
## PPGENDER  No Yes
##   Female 205 888
##   Male   283 776
q1 <- data2 %>%
  count(Q1, PPGENDER)

# plot
ggplot(data2[!is.na(data2$Q1), ]) + geom_bar(mapping = aes(x = Q1, fill = PPGENDER), position = position_dodge())

# plot with facet
ggplot(q1[!is.na(q1$Q1), ], aes(x = Q1, y = n, fill = Q1)) +
  geom_bar(stat = 'identity', position = position_dodge()) + facet_wrap(~PPGENDER)

# by ethnicity, PPETHM
with(data2, table(PPETHM, Q1))
##                         Q1
## PPETHM                     No  Yes
##   2+ Races, Non-Hispanic   18   62
##   Black, Non-Hispanic      50  143
##   Hispanic                 69  161
##   Other, Non-Hispanic      29   63
##   White, Non-Hispanic     322 1235
q1 <- data2 %>%
  count(Q1, PPETHM)

# plot
ggplot(q1[!is.na(q1$Q1), ], aes(x = Q1, y = n, fill = PPETHM)) +
  geom_bar(stat = 'identity', position = position_dodge())

# plot with facet
ggplot(q1[!is.na(q1$Q1), ], aes(x = Q1, y = n, fill = Q1)) +
  geom_bar(stat = 'identity', position = position_dodge()) + facet_wrap(~PPETHM)

# by income, PPINCIMP
with(data2, table(PPINCIMP, Q1))
##                       Q1
## PPINCIMP                No Yes
##   Less than $5,000      22  30
##   $5,000 to $7,499       8  16
##   $7,500 to $9,999       7   7
##   $10,000 to $12,499    17  39
##   $12,500 to $14,999    10  38
##   $15,000 to $19,999    22  40
##   $20,000 to $24,999    16  55
##   $25,000 to $29,999    23  76
##   $30,000 to $34,999    21  70
##   $35,000 to $39,999    31  72
##   $40,000 to $49,999    42 107
##   $50,000 to $59,999    46 137
##   $60,000 to $74,999    50 172
##   $75,000 to $84,999    26 133
##   $85,000 to $99,999    33 120
##   $100,000 to $124,999  56 269
##   $125,000 to $149,999  24 108
##   $150,000 to $174,999  16  68
##   $175,000 or more      18 107
q1 <- data2 %>%
  count(Q1, PPINCIMP)

# plot
ggplot(q1[!is.na(q1$Q1), ], aes(x = Q1, y = n, fill = PPINCIMP)) +
  geom_bar(stat = 'identity', position = position_dodge())

# plot with facet
ggplot(q1[!is.na(q1$Q1), ], aes(x = Q1, y = n, fill = Q1)) +
  geom_bar(stat = 'identity', position = position_dodge()) + facet_wrap(~PPINCIMP)

Q2. Have you had an illness with influenza-like symptoms since August 2015?

with(data2, table(Q2))
## Q2
##   No  Yes 
## 1735  414
q2 <- data2 %>%
  count(Q2)
ggplot(q2, aes(x = Q2, y = n, fill = Q2)) + geom_bar(stat = 'identity')

# by gender
with(data2, table(Q2, PPGENDER))
##      PPGENDER
## Q2    Female Male
##   No     858  877
##   Yes    234  180
q2 <- data2 %>%
  count(Q2, PPGENDER)
ggplot(q2, aes(x = Q2, y = n, fill = PPGENDER)) +
  geom_bar(stat = 'identity', position = position_dodge())

# by ethnicity
with(data2, table(Q2, PPETHM))
##      PPETHM
## Q2    2+ Races, Non-Hispanic Black, Non-Hispanic Hispanic
##   No                      61                 152      164
##   Yes                     19                  39       65
##      PPETHM
## Q2    Other, Non-Hispanic White, Non-Hispanic
##   No                   71                1287
##   Yes                  22                 269
q2 <- data2 %>%
  count(Q2, PPETHM)
ggplot(q2, aes(x = Q2, y = n, fill = PPETHM)) +
  geom_bar(stat = 'identity', position = position_dodge())

# by income
with(data2, table(PPINCIMP, Q2))
##                       Q2
## PPINCIMP                No Yes
##   Less than $5,000      43   9
##   $5,000 to $7,499      19   6
##   $7,500 to $9,999      13   1
##   $10,000 to $12,499    38  17
##   $12,500 to $14,999    39   9
##   $15,000 to $19,999    46  15
##   $20,000 to $24,999    55  17
##   $25,000 to $29,999    79  19
##   $30,000 to $34,999    74  18
##   $35,000 to $39,999    85  18
##   $40,000 to $49,999   121  27
##   $50,000 to $59,999   155  27
##   $60,000 to $74,999   172  50
##   $75,000 to $84,999   130  29
##   $85,000 to $99,999   123  29
##   $100,000 to $124,999 265  61
##   $125,000 to $149,999 112  20
##   $150,000 to $174,999  62  21
##   $175,000 or more     104  21
q2 <- data2 %>%
  count(Q2, PPINCIMP)
ggplot(q2, aes(x = Q2, y = n, fill = PPINCIMP)) +
  geom_bar(stat = 'identity', position = position_dodge())

Q3. Has any other person in your household had an illness with influenza like symptoms since August 2015?

# all
with(data2, table(Q3))
## Q3
## Don_t know         No        Yes 
##        161       1608        383
q3 <- data2 %>%
  count(Q3)
ggplot(q3, aes(x = Q3, y = n, fill = Q3)) + geom_bar(stat = 'identity')

# by gender
with(data2, table(Q3, PPGENDER))
##             PPGENDER
## Q3           Female Male
##   Don_t know     72   89
##   No            804  804
##   Yes           217  166
q3 <- data2 %>%
  count(Q3, PPGENDER)
ggplot(q3, aes(x = Q3, y = n, fill = PPGENDER)) +
  geom_bar(stat = 'identity', position = position_dodge())

# by ethnicity
with(data2, table(Q3, PPETHM))
##             PPETHM
## Q3           2+ Races, Non-Hispanic Black, Non-Hispanic Hispanic
##   Don_t know                      6                  19       30
##   No                             57                 149      146
##   Yes                            17                  25       53
##             PPETHM
## Q3           Other, Non-Hispanic White, Non-Hispanic
##   Don_t know                  11                  95
##   No                          59                1197
##   Yes                         23                 265
q3 <- data2 %>%
  count(Q3, PPETHM)
ggplot(q3, aes(x = Q3, y = n, fill = PPETHM)) +
  geom_bar(stat = 'identity', position = position_dodge())

# by income
with(data2, table(PPINCIMP, Q3))
##                       Q3
## PPINCIMP               Don_t know  No Yes
##   Less than $5,000             11  36   5
##   $5,000 to $7,499              6  18   1
##   $7,500 to $9,999              1  13   0
##   $10,000 to $12,499            4  44   8
##   $12,500 to $14,999            7  30  11
##   $15,000 to $19,999            7  47   8
##   $20,000 to $24,999            8  52  12
##   $25,000 to $29,999            4  81  13
##   $30,000 to $34,999           11  70   9
##   $35,000 to $39,999           11  75  17
##   $40,000 to $49,999            6 117  25
##   $50,000 to $59,999           13 136  33
##   $60,000 to $74,999           18 165  39
##   $75,000 to $84,999            7 120  33
##   $85,000 to $99,999           11 107  35
##   $100,000 to $124,999         20 245  61
##   $125,000 to $149,999          6 100  26
##   $150,000 to $174,999          3  58  23
##   $175,000 or more              7  94  24
q3 <- data2 %>%
  count(Q3, PPINCIMP)
ggplot(q3, aes(x = Q3, y = n, fill = PPINCIMP)) +
  geom_bar(stat = 'identity', position = position_dodge())

Q4. Does your job require you to have a lot of contact with the public?

# all
with(data2, table(Q4))
## Q4
##                                         No, I don_t work 
##                                                      779 
## No, my job does not require much contact with the public 
##                                                      620 
##                                                      Yes 
##                                                      751
q4 <- data2 %>%
  count(Q4)

ggplot(q4, aes(x = Q4, y = n, fill = Q4)) + geom_bar(stat = 'identity') +
    theme(axis.text.x = element_text(angle = 45, hjust = 1))

# by gender
with(data2, table(Q4, PPGENDER))
##                                                           PPGENDER
## Q4                                                         Female Male
##   No, I don_t work                                            430  349
##   No, my job does not require much contact with the public    263  357
##   Yes                                                         400  351
q4 <- data2 %>%
  count(Q4, PPGENDER)
ggplot(q4, aes(x = Q4, y = n, fill = PPGENDER)) +
  geom_bar(stat = 'identity', position = position_dodge()) +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

# by ethnicity
with(data2, table(PPETHM, Q4))
##                         Q4
## PPETHM                   No, I don_t work
##   2+ Races, Non-Hispanic               30
##   Black, Non-Hispanic                  69
##   Hispanic                             69
##   Other, Non-Hispanic                  24
##   White, Non-Hispanic                 587
##                         Q4
## PPETHM                   No, my job does not require much contact with the public
##   2+ Races, Non-Hispanic                                                       23
##   Black, Non-Hispanic                                                          59
##   Hispanic                                                                     72
##   Other, Non-Hispanic                                                          34
##   White, Non-Hispanic                                                         432
##                         Q4
## PPETHM                   Yes
##   2+ Races, Non-Hispanic  27
##   Black, Non-Hispanic     64
##   Hispanic                87
##   Other, Non-Hispanic     35
##   White, Non-Hispanic    538
q4 <- data2 %>%
  count(Q4, PPETHM)
ggplot(q4, aes(x = Q4, y = n, fill = PPETHM)) +
  geom_bar(stat = 'identity', position = position_dodge()) +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

# by income 
with(data2, table(PPINCIMP, Q4))
##                       Q4
## PPINCIMP               No, I don_t work
##   Less than $5,000                   29
##   $5,000 to $7,499                   15
##   $7,500 to $9,999                   11
##   $10,000 to $12,499                 33
##   $12,500 to $14,999                 32
##   $15,000 to $19,999                 28
##   $20,000 to $24,999                 35
##   $25,000 to $29,999                 46
##   $30,000 to $34,999                 38
##   $35,000 to $39,999                 42
##   $40,000 to $49,999                 64
##   $50,000 to $59,999                 60
##   $60,000 to $74,999                 73
##   $75,000 to $84,999                 45
##   $85,000 to $99,999                 47
##   $100,000 to $124,999               87
##   $125,000 to $149,999               39
##   $150,000 to $174,999               23
##   $175,000 or more                   32
##                       Q4
## PPINCIMP               No, my job does not require much contact with the public
##   Less than $5,000                                                           17
##   $5,000 to $7,499                                                            5
##   $7,500 to $9,999                                                            1
##   $10,000 to $12,499                                                          7
##   $12,500 to $14,999                                                          5
##   $15,000 to $19,999                                                         13
##   $20,000 to $24,999                                                         18
##   $25,000 to $29,999                                                         15
##   $30,000 to $34,999                                                         25
##   $35,000 to $39,999                                                         22
##   $40,000 to $49,999                                                         41
##   $50,000 to $59,999                                                         58
##   $60,000 to $74,999                                                         60
##   $75,000 to $84,999                                                         51
##   $85,000 to $99,999                                                         48
##   $100,000 to $124,999                                                      111
##   $125,000 to $149,999                                                       51
##   $150,000 to $174,999                                                       25
##   $175,000 or more                                                           47
##                       Q4
## PPINCIMP               Yes
##   Less than $5,000       6
##   $5,000 to $7,499       5
##   $7,500 to $9,999       2
##   $10,000 to $12,499    15
##   $12,500 to $14,999    11
##   $15,000 to $19,999    21
##   $20,000 to $24,999    19
##   $25,000 to $29,999    37
##   $30,000 to $34,999    29
##   $35,000 to $39,999    39
##   $40,000 to $49,999    43
##   $50,000 to $59,999    63
##   $60,000 to $74,999    88
##   $75,000 to $84,999    64
##   $85,000 to $99,999    58
##   $100,000 to $124,999 127
##   $125,000 to $149,999  42
##   $150,000 to $174,999  36
##   $175,000 or more      46
q4 <- data2 %>%
  count(Q4, PPINCIMP)
ggplot(q4, aes(x = Q4, y = n, fill = PPINCIMP)) +
  geom_bar(stat = 'identity', position = position_dodge()) +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Q5. Do you have a car that you can use to travel to work?

# all
with(data2, table(Q5))
## Q5
##   No  Yes 
##  133 1235
q5 <- data2 %>%
  count(Q5)
ggplot(q5, aes(x = Q5, y = n, fill = Q5)) + geom_bar(stat = 'identity')

# by gender
with(data2, table(PPGENDER, Q5))
##         Q5
## PPGENDER  No Yes
##   Female  70 592
##   Male    63 643
q5 <- data2 %>%
  count(Q5, PPGENDER)
ggplot(q5, aes(x = Q5, y = n, fill = PPGENDER)) +
  geom_bar(stat = 'identity', position = position_dodge())

# by ethnicity 
with(data2, table(PPETHM, Q5))
##                         Q5
## PPETHM                    No Yes
##   2+ Races, Non-Hispanic   7  43
##   Black, Non-Hispanic     22 101
##   Hispanic                24 135
##   Other, Non-Hispanic      8  61
##   White, Non-Hispanic     72 895
q5 <- data2 %>%
  count(Q5, PPETHM)
ggplot(q5, aes(x = Q5, y = n, fill = PPETHM)) +
  geom_bar(stat = 'identity', position = position_dodge())

# by income
with(data2, table(PPINCIMP, Q5))
##                       Q5
## PPINCIMP                No Yes
##   Less than $5,000       6  17
##   $5,000 to $7,499       5   5
##   $7,500 to $9,999       1   2
##   $10,000 to $12,499     3  19
##   $12,500 to $14,999     3  13
##   $15,000 to $19,999     4  30
##   $20,000 to $24,999     6  30
##   $25,000 to $29,999     8  44
##   $30,000 to $34,999     7  47
##   $35,000 to $39,999     9  52
##   $40,000 to $49,999    11  72
##   $50,000 to $59,999    12 109
##   $60,000 to $74,999     9 138
##   $75,000 to $84,999    13 102
##   $85,000 to $99,999     8  98
##   $100,000 to $124,999   8 230
##   $125,000 to $149,999   5  88
##   $150,000 to $174,999   7  54
##   $175,000 or more       8  85
q5 <- data2 %>%
  count(Q5, PPINCIMP)
ggplot(q5, aes(x = Q5, y = n, fill = PPINCIMP)) +
  geom_bar(stat = 'identity', position = position_dodge())

Q6. Do you regularly use public transportation?

with(data2, table(Q6))
## Q6
##   No  Yes 
## 1959  194
q6 <- data2 %>%
  count(Q6)
ggplot(q6, aes(x = Q6, y = n, fill = Q6)) + geom_bar(stat = 'identity')

# by gender
with(data2, table(PPGENDER, Q6))
##         Q6
## PPGENDER  No Yes
##   Female 998  96
##   Male   961  98
q6 <- data2 %>%
  count(Q6, PPGENDER)

ggplot(q6, aes(x = Q6, y = n, fill = PPGENDER)) +
  geom_bar(stat = 'identity', position = position_dodge())

# by ethnicity
with(data2, table(PPETHM, Q6))
##                         Q6
## PPETHM                     No  Yes
##   2+ Races, Non-Hispanic   62   18
##   Black, Non-Hispanic     158   36
##   Hispanic                196   32
##   Other, Non-Hispanic      80   13
##   White, Non-Hispanic    1463   95
q6 <- data2 %>%
  count(Q6, PPETHM)

ggplot(q6, aes(x = Q6, y = n, fill = PPETHM)) +
  geom_bar(stat = 'identity', position = position_dodge())

# by income 
with(data2, table(PPINCIMP, Q6))
##                       Q6
## PPINCIMP                No Yes
##   Less than $5,000      42  10
##   $5,000 to $7,499      22   3
##   $7,500 to $9,999      10   4
##   $10,000 to $12,499    47   9
##   $12,500 to $14,999    42   5
##   $15,000 to $19,999    58   4
##   $20,000 to $24,999    64   8
##   $25,000 to $29,999    90   8
##   $30,000 to $34,999    85   7
##   $35,000 to $39,999    92  12
##   $40,000 to $49,999   141   7
##   $50,000 to $59,999   166  17
##   $60,000 to $74,999   200  20
##   $75,000 to $84,999   148  12
##   $85,000 to $99,999   142  11
##   $100,000 to $124,999 305  21
##   $125,000 to $149,999 123   9
##   $150,000 to $174,999  74  10
##   $175,000 or more     108  17
q6 <- data2 %>%
  count(Q6, PPINCIMP)

ggplot(q6, aes(x = Q6, y = n, fill = PPINCIMP)) +
  geom_bar(stat = 'identity', position = position_dodge())

Q7. What types of public transportation do you regularly use?

# look at patterned names
# grep("Q7", names(data2))

# make long data
q7_long <- data2 %>%
  gather("Q7_q", "Q7_r", starts_with("Q7_"), -contains("Text"), -contains("Refused"), na.rm = TRUE)

#grep("Q7", names(q7_long))
#View(q7_long[c(1, 34, 35, 423:424)])

with(q7_long, table(Q7_q, Q7_r))
##                Q7_r
## Q7_q             No Yes
##   Q7_1_Bus       57 137
##   Q7_2_Carpool  184  10
##   Q7_3_Subway   131  63
##   Q7_4_Train    139  55
##   Q7_5_Taxi     169  25
##   Q7_6_Airplane 175  19
##   Q7_7_Other    179  15
q7 <- q7_long %>%
  count(Q7_q, Q7_r)

# flip coordinates
ggplot(q7[!is.na(q7$Q7_r), ], aes(x = Q7_r, y = n, fill = Q7_r)) +
  geom_bar(stat = 'identity', position = position_dodge()) + facet_wrap(~Q7_q) + coord_flip()

# by gender
with(q7_long, table(PPGENDER, Q7_q, Q7_r))
## , , Q7_r = No
## 
##         Q7_q
## PPGENDER Q7_1_Bus Q7_2_Carpool Q7_3_Subway Q7_4_Train Q7_5_Taxi
##   Female       27           91          68         75        81
##   Male         30           93          63         64        88
##         Q7_q
## PPGENDER Q7_6_Airplane Q7_7_Other
##   Female            89         87
##   Male              86         92
## 
## , , Q7_r = Yes
## 
##         Q7_q
## PPGENDER Q7_1_Bus Q7_2_Carpool Q7_3_Subway Q7_4_Train Q7_5_Taxi
##   Female       69            5          28         21        15
##   Male         68            5          35         34        10
##         Q7_q
## PPGENDER Q7_6_Airplane Q7_7_Other
##   Female             7          9
##   Male              12          6
q7 <- q7_long %>%
  group_by(PPGENDER, Q7_q, Q7_r) %>%
  count(PPGENDER, Q7_q, Q7_r)

ggplot(q7[!is.na(q7$Q7_r), ], aes(x = Q7_r, y = n, fill = PPGENDER)) +
  geom_bar(stat = 'identity', position = position_dodge()) + facet_wrap(~Q7_q)

# by ethnicity
with(q7_long, table(PPETHM, Q7_q, Q7_r))
## , , Q7_r = No
## 
##                         Q7_q
## PPETHM                   Q7_1_Bus Q7_2_Carpool Q7_3_Subway Q7_4_Train
##   2+ Races, Non-Hispanic        4           18          12         15
##   Black, Non-Hispanic           5           35          26         27
##   Hispanic                      9           27          21         23
##   Other, Non-Hispanic           6           13           7          7
##   White, Non-Hispanic          33           91          65         67
##                         Q7_q
## PPETHM                   Q7_5_Taxi Q7_6_Airplane Q7_7_Other
##   2+ Races, Non-Hispanic        14            15         16
##   Black, Non-Hispanic           32            36         33
##   Hispanic                      27            31         32
##   Other, Non-Hispanic           12            12         13
##   White, Non-Hispanic           84            81         85
## 
## , , Q7_r = Yes
## 
##                         Q7_q
## PPETHM                   Q7_1_Bus Q7_2_Carpool Q7_3_Subway Q7_4_Train
##   2+ Races, Non-Hispanic       14            0           6          3
##   Black, Non-Hispanic          31            1          10          9
##   Hispanic                     23            5          11          9
##   Other, Non-Hispanic           7            0           6          6
##   White, Non-Hispanic          62            4          30         28
##                         Q7_q
## PPETHM                   Q7_5_Taxi Q7_6_Airplane Q7_7_Other
##   2+ Races, Non-Hispanic         4             3          2
##   Black, Non-Hispanic            4             0          3
##   Hispanic                       5             1          0
##   Other, Non-Hispanic            1             1          0
##   White, Non-Hispanic           11            14         10
q7 <- q7_long %>%
  group_by(PPETHM, Q7_q, Q7_r) %>%
  count(PPETHM, Q7_q, Q7_r)

ggplot(q7[!is.na(q7$Q7_r), ], aes(x = Q7_r, y = n, fill = PPETHM)) +
  geom_bar(stat = 'identity', position = position_dodge()) + facet_wrap(~Q7_q)

# by income
with(q7_long, table(PPINCIMP, Q7_q, Q7_r ))
## , , Q7_r = No
## 
##                       Q7_q
## PPINCIMP               Q7_1_Bus Q7_2_Carpool Q7_3_Subway Q7_4_Train
##   Less than $5,000            0           10           9          8
##   $5,000 to $7,499            3            2           3          2
##   $7,500 to $9,999            2            4           3          2
##   $10,000 to $12,499          3            9           9          8
##   $12,500 to $14,999          0            5           5          4
##   $15,000 to $19,999          1            4           4          4
##   $20,000 to $24,999          2            7           7          6
##   $25,000 to $29,999          0            7           7          7
##   $30,000 to $34,999          1            6           6          6
##   $35,000 to $39,999          2           12           7          9
##   $40,000 to $49,999          4            6           5          5
##   $50,000 to $59,999          6           17          12         12
##   $60,000 to $74,999          2           19          15         17
##   $75,000 to $84,999          4           11           5          8
##   $85,000 to $99,999          3            9           6          7
##   $100,000 to $124,999        8           21          11         11
##   $125,000 to $149,999        3            9           6          6
##   $150,000 to $174,999        4            9           4          7
##   $175,000 or more            9           17           7         10
##                       Q7_q
## PPINCIMP               Q7_5_Taxi Q7_6_Airplane Q7_7_Other
##   Less than $5,000             9             9          9
##   $5,000 to $7,499             3             3          2
##   $7,500 to $9,999             3             4          3
##   $10,000 to $12,499           7             9          7
##   $12,500 to $14,999           5             5          5
##   $15,000 to $19,999           3             4          4
##   $20,000 to $24,999           8             8          7
##   $25,000 to $29,999           6             8          8
##   $30,000 to $34,999           4             6          7
##   $35,000 to $39,999          11            10         11
##   $40,000 to $49,999           7             7          7
##   $50,000 to $59,999          13            15         16
##   $60,000 to $74,999          19            20         16
##   $75,000 to $84,999           9            10         12
##   $85,000 to $99,999          10             8         10
##   $100,000 to $124,999        20            19         20
##   $125,000 to $149,999         9             9          9
##   $150,000 to $174,999         9             7          9
##   $175,000 or more            14            14         17
## 
## , , Q7_r = Yes
## 
##                       Q7_q
## PPINCIMP               Q7_1_Bus Q7_2_Carpool Q7_3_Subway Q7_4_Train
##   Less than $5,000           10            0           1          2
##   $5,000 to $7,499            0            1           0          1
##   $7,500 to $9,999            2            0           1          2
##   $10,000 to $12,499          6            0           0          1
##   $12,500 to $14,999          5            0           0          1
##   $15,000 to $19,999          3            0           0          0
##   $20,000 to $24,999          6            1           1          2
##   $25,000 to $29,999          8            1           1          1
##   $30,000 to $34,999          6            1           1          1
##   $35,000 to $39,999         10            0           5          3
##   $40,000 to $49,999          3            1           2          2
##   $50,000 to $59,999         11            0           5          5
##   $60,000 to $74,999         18            1           5          3
##   $75,000 to $84,999          8            1           7          4
##   $85,000 to $99,999          8            2           5          4
##   $100,000 to $124,999       13            0          10         10
##   $125,000 to $149,999        6            0           3          3
##   $150,000 to $174,999        6            1           6          3
##   $175,000 or more            8            0          10          7
##                       Q7_q
## PPINCIMP               Q7_5_Taxi Q7_6_Airplane Q7_7_Other
##   Less than $5,000             1             1          1
##   $5,000 to $7,499             0             0          1
##   $7,500 to $9,999             1             0          1
##   $10,000 to $12,499           2             0          2
##   $12,500 to $14,999           0             0          0
##   $15,000 to $19,999           1             0          0
##   $20,000 to $24,999           0             0          1
##   $25,000 to $29,999           2             0          0
##   $30,000 to $34,999           3             1          0
##   $35,000 to $39,999           1             2          1
##   $40,000 to $49,999           0             0          0
##   $50,000 to $59,999           4             2          1
##   $60,000 to $74,999           1             0          4
##   $75,000 to $84,999           3             2          0
##   $85,000 to $99,999           1             3          1
##   $100,000 to $124,999         1             2          1
##   $125,000 to $149,999         0             0          0
##   $150,000 to $174,999         1             3          1
##   $175,000 or more             3             3          0
q7 <- q7_long %>%
  group_by(PPINCIMP, Q7_q, Q7_r) %>%
  count(PPINCIMP, Q7_q, Q7_r)

ggplot(q7[!is.na(q7$Q7_r), ], aes(x = Q7_r, y = n, fill = PPINCIMP)) +
  geom_bar(stat = 'identity', position = position_dodge()) + facet_wrap(~Q7_q)

Q8. For what types of activities do you regularly use public transportation?

q8_long <- data2 %>%
  gather("Q8_q", "Q8_r", starts_with("Q8_"), -contains("otherText"), -contains("Refused"))

with(q8_long, table(Q8_q, Q8_r))
##                       Q8_r
## Q8_q                    No Yes
##   Q8_1_Work             89 105
##   Q8_2_School          158  36
##   Q8_3_Shopping        107  87
##   Q8_4_Visiting.people 125  69
##   Q8_5_Recreation      127  67
##   Q8_6_Other           175  19
q8 <- q8_long %>%
  count(Q8_q, Q8_r)


# PPGENDER
with(q8_long, table(PPGENDER, Q8_q, Q8_r))
## , , Q8_r = No
## 
##         Q8_q
## PPGENDER Q8_1_Work Q8_2_School Q8_3_Shopping Q8_4_Visiting.people
##   Female        53          78            43                   60
##   Male          36          80            64                   65
##         Q8_q
## PPGENDER Q8_5_Recreation Q8_6_Other
##   Female              64         84
##   Male                63         91
## 
## , , Q8_r = Yes
## 
##         Q8_q
## PPGENDER Q8_1_Work Q8_2_School Q8_3_Shopping Q8_4_Visiting.people
##   Female        43          18            53                   36
##   Male          62          18            34                   33
##         Q8_q
## PPGENDER Q8_5_Recreation Q8_6_Other
##   Female              32         12
##   Male                35          7
q8 <- q8_long %>%
  group_by(PPGENDER, Q8_q, Q8_r) %>%
  count(PPGENDER, Q8_q, Q8_r)

# PPETHM
with(q8_long, table(PPETHM, Q8_q, Q8_r))
## , , Q8_r = No
## 
##                         Q8_q
## PPETHM                   Q8_1_Work Q8_2_School Q8_3_Shopping
##   2+ Races, Non-Hispanic         7          16             7
##   Black, Non-Hispanic           17          29            21
##   Hispanic                      14          25            15
##   Other, Non-Hispanic            4           7             9
##   White, Non-Hispanic           47          81            55
##                         Q8_q
## PPETHM                   Q8_4_Visiting.people Q8_5_Recreation Q8_6_Other
##   2+ Races, Non-Hispanic                    9               8         15
##   Black, Non-Hispanic                      21              26         33
##   Hispanic                                 20              24         30
##   Other, Non-Hispanic                      11              11         13
##   White, Non-Hispanic                      64              58         84
## 
## , , Q8_r = Yes
## 
##                         Q8_q
## PPETHM                   Q8_1_Work Q8_2_School Q8_3_Shopping
##   2+ Races, Non-Hispanic        11           2            11
##   Black, Non-Hispanic           19           7            15
##   Hispanic                      18           7            17
##   Other, Non-Hispanic            9           6             4
##   White, Non-Hispanic           48          14            40
##                         Q8_q
## PPETHM                   Q8_4_Visiting.people Q8_5_Recreation Q8_6_Other
##   2+ Races, Non-Hispanic                    9              10          3
##   Black, Non-Hispanic                      15              10          3
##   Hispanic                                 12               8          2
##   Other, Non-Hispanic                       2               2          0
##   White, Non-Hispanic                      31              37         11
# PPINCIMP
with(q8_long, table(PPINCIMP, Q8_q, Q8_r))
## , , Q8_r = No
## 
##                       Q8_q
## PPINCIMP               Q8_1_Work Q8_2_School Q8_3_Shopping
##   Less than $5,000             8           8             3
##   $5,000 to $7,499             1           2             2
##   $7,500 to $9,999             2           4             1
##   $10,000 to $12,499           7           8             7
##   $12,500 to $14,999           3           4             2
##   $15,000 to $19,999           3           2             0
##   $20,000 to $24,999           4           7             5
##   $25,000 to $29,999           5           8             0
##   $30,000 to $34,999           3           7             4
##   $35,000 to $39,999           2          10             6
##   $40,000 to $49,999           4           4             3
##   $50,000 to $59,999           9          12             9
##   $60,000 to $74,999          10          15             9
##   $75,000 to $84,999           3           9             5
##   $85,000 to $99,999           3           8             9
##   $100,000 to $124,999         9          17            16
##   $125,000 to $149,999         4           8             5
##   $150,000 to $174,999         3           9             8
##   $175,000 or more             6          16            13
##                       Q8_q
## PPINCIMP               Q8_4_Visiting.people Q8_5_Recreation Q8_6_Other
##   Less than $5,000                        5               8          9
##   $5,000 to $7,499                        2               3          2
##   $7,500 to $9,999                        2               3          4
##   $10,000 to $12,499                      6               7          3
##   $12,500 to $14,999                      3               4          4
##   $15,000 to $19,999                      3               2          3
##   $20,000 to $24,999                      6               6          6
##   $25,000 to $29,999                      6               4          8
##   $30,000 to $34,999                      3               4          7
##   $35,000 to $39,999                      7               7         12
##   $40,000 to $49,999                      6               5          7
##   $50,000 to $59,999                     12              13         16
##   $60,000 to $74,999                      9              14         20
##   $75,000 to $84,999                      4               3         12
##   $85,000 to $99,999                      9              10         10
##   $100,000 to $124,999                   19              17         19
##   $125,000 to $149,999                    5               4          7
##   $150,000 to $174,999                    7               4         10
##   $175,000 or more                       11               9         16
## 
## , , Q8_r = Yes
## 
##                       Q8_q
## PPINCIMP               Q8_1_Work Q8_2_School Q8_3_Shopping
##   Less than $5,000             2           2             7
##   $5,000 to $7,499             2           1             1
##   $7,500 to $9,999             2           0             3
##   $10,000 to $12,499           2           1             2
##   $12,500 to $14,999           2           1             3
##   $15,000 to $19,999           1           2             4
##   $20,000 to $24,999           4           1             3
##   $25,000 to $29,999           3           0             8
##   $30,000 to $34,999           4           0             3
##   $35,000 to $39,999          10           2             6
##   $40,000 to $49,999           3           3             4
##   $50,000 to $59,999           8           5             8
##   $60,000 to $74,999          10           5            11
##   $75,000 to $84,999           9           3             7
##   $85,000 to $99,999           8           3             2
##   $100,000 to $124,999        12           4             5
##   $125,000 to $149,999         5           1             4
##   $150,000 to $174,999         7           1             2
##   $175,000 or more            11           1             4
##                       Q8_q
## PPINCIMP               Q8_4_Visiting.people Q8_5_Recreation Q8_6_Other
##   Less than $5,000                        5               2          1
##   $5,000 to $7,499                        1               0          1
##   $7,500 to $9,999                        2               1          0
##   $10,000 to $12,499                      3               2          6
##   $12,500 to $14,999                      2               1          1
##   $15,000 to $19,999                      1               2          1
##   $20,000 to $24,999                      2               2          2
##   $25,000 to $29,999                      2               4          0
##   $30,000 to $34,999                      4               3          0
##   $35,000 to $39,999                      5               5          0
##   $40,000 to $49,999                      1               2          0
##   $50,000 to $59,999                      5               4          1
##   $60,000 to $74,999                     11               6          0
##   $75,000 to $84,999                      8               9          0
##   $85,000 to $99,999                      2               1          1
##   $100,000 to $124,999                    2               4          2
##   $125,000 to $149,999                    4               5          2
##   $150,000 to $174,999                    3               6          0
##   $175,000 or more                        6               8          1

Q9. Do other members of your household regularly use public transportation?

with(data2, table(Q9))
## Q9
## Don_t know         No        Yes 
##         32       1935        183

Q10. What types of public transportation do other members of your household regularly use?

#Q10 <- data2 %>%
#  select(CaseID, PPGENDER, PPAGE, PPEDUC, PPETHM, PPINCIMP, PPWORK, #Q10_1_Bus:Q10_9_Refused) %>%
#  gather("Q10_q", "Q10_r", Q10_1_Bus:Q10_8_Other)


q10_long <- data2 %>%
  gather("Q10_q", "Q10_r", starts_with("Q10_"), -contains("Text"), -contains("Refused"), na.rm = TRUE)

with(q10_long, table(Q10_q, Q10_r))
##                   Q10_r
## Q10_q               No Yes
##   Q10_1_Bus         48 135
##   Q10_2_Carpool    166  17
##   Q10_3_Subway     130  53
##   Q10_4_Train      137  46
##   Q10_5_Taxi       157  26
##   Q10_6_Airplane   164  19
##   Q10_7_Don_t.know 182   1
##   Q10_8_Other      172  11
q10 <- q10_long %>%
  count(Q10_q, Q10_r)


# PPGENDER
with(q10_long, table(PPGENDER, Q10_q, Q10_r))
## , , Q10_r = No
## 
##         Q10_q
## PPGENDER Q10_1_Bus Q10_2_Carpool Q10_3_Subway Q10_4_Train Q10_5_Taxi
##   Female        26            91           70          74         83
##   Male          22            75           60          63         74
##         Q10_q
## PPGENDER Q10_6_Airplane Q10_7_Don_t.know Q10_8_Other
##   Female             91               99          92
##   Male               73               83          80
## 
## , , Q10_r = Yes
## 
##         Q10_q
## PPGENDER Q10_1_Bus Q10_2_Carpool Q10_3_Subway Q10_4_Train Q10_5_Taxi
##   Female        73             8           29          25         16
##   Male          62             9           24          21         10
##         Q10_q
## PPGENDER Q10_6_Airplane Q10_7_Don_t.know Q10_8_Other
##   Female              8                0           7
##   Male               11                1           4
q10 <- q10_long %>%
  group_by(PPGENDER, Q10_q, Q10_r) %>%
  count(PPGENDER, Q10_q, Q10_r)

# PPETHM
with(q10_long, table(PPETHM, Q10_q, Q10_r))
## , , Q10_r = No
## 
##                         Q10_q
## PPETHM                   Q10_1_Bus Q10_2_Carpool Q10_3_Subway Q10_4_Train
##   2+ Races, Non-Hispanic         4            10            7           9
##   Black, Non-Hispanic            4            29           20          24
##   Hispanic                      12            38           28          33
##   Other, Non-Hispanic            5            11           10          10
##   White, Non-Hispanic           23            78           65          61
##                         Q10_q
## PPETHM                   Q10_5_Taxi Q10_6_Airplane Q10_7_Don_t.know
##   2+ Races, Non-Hispanic          9             10               11
##   Black, Non-Hispanic            27             32               32
##   Hispanic                       37             37               41
##   Other, Non-Hispanic            11             11               14
##   White, Non-Hispanic            73             74               84
##                         Q10_q
## PPETHM                   Q10_8_Other
##   2+ Races, Non-Hispanic          12
##   Black, Non-Hispanic             29
##   Hispanic                        40
##   Other, Non-Hispanic             14
##   White, Non-Hispanic             77
## 
## , , Q10_r = Yes
## 
##                         Q10_q
## PPETHM                   Q10_1_Bus Q10_2_Carpool Q10_3_Subway Q10_4_Train
##   2+ Races, Non-Hispanic         8             2            5           3
##   Black, Non-Hispanic           28             3           12           8
##   Hispanic                      29             3           13           8
##   Other, Non-Hispanic            9             3            4           4
##   White, Non-Hispanic           61             6           19          23
##                         Q10_q
## PPETHM                   Q10_5_Taxi Q10_6_Airplane Q10_7_Don_t.know
##   2+ Races, Non-Hispanic          3              2                1
##   Black, Non-Hispanic             5              0                0
##   Hispanic                        4              4                0
##   Other, Non-Hispanic             3              3                0
##   White, Non-Hispanic            11             10                0
##                         Q10_q
## PPETHM                   Q10_8_Other
##   2+ Races, Non-Hispanic           0
##   Black, Non-Hispanic              3
##   Hispanic                         1
##   Other, Non-Hispanic              0
##   White, Non-Hispanic              7
# PPINCIMP
with(q10_long, table(PPINCIMP, Q10_q, Q10_r))
## , , Q10_r = No
## 
##                       Q10_q
## PPINCIMP               Q10_1_Bus Q10_2_Carpool Q10_3_Subway Q10_4_Train
##   Less than $5,000             0             8            8           7
##   $5,000 to $7,499             2             2            1           1
##   $7,500 to $9,999             1             2            1           0
##   $10,000 to $12,499           2             5            5           4
##   $12,500 to $14,999           0             6            5           6
##   $15,000 to $19,999           0             2            2           2
##   $20,000 to $24,999           2             8           12          11
##   $25,000 to $29,999           0             6            4           5
##   $30,000 to $34,999           2             5            4           5
##   $35,000 to $39,999           2             8            5           4
##   $40,000 to $49,999           3             7            6           5
##   $50,000 to $59,999           2            14            9           9
##   $60,000 to $74,999           3            17           16          19
##   $75,000 to $84,999           2            12           10          10
##   $85,000 to $99,999           3             8            2           5
##   $100,000 to $124,999         9            23           16          15
##   $125,000 to $149,999         4            11            6           9
##   $150,000 to $174,999         4            12            9          10
##   $175,000 or more             7            10            9          10
##                       Q10_q
## PPINCIMP               Q10_5_Taxi Q10_6_Airplane Q10_7_Don_t.know
##   Less than $5,000              7              8                8
##   $5,000 to $7,499              2              2                2
##   $7,500 to $9,999              1              2                2
##   $10,000 to $12,499            4              4                5
##   $12,500 to $14,999            6              6                6
##   $15,000 to $19,999            2              2                2
##   $20,000 to $24,999            9             11               12
##   $25,000 to $29,999            6              6                6
##   $30,000 to $34,999            5              5                5
##   $35,000 to $39,999            8              8                9
##   $40,000 to $49,999            7              7                7
##   $50,000 to $59,999           11             13               15
##   $60,000 to $74,999           22             22               22
##   $75,000 to $84,999           13             13               12
##   $85,000 to $99,999            6              7                8
##   $100,000 to $124,999         20             21               23
##   $125,000 to $149,999         10             10               11
##   $150,000 to $174,999          8              9               14
##   $175,000 or more             10              8               13
##                       Q10_q
## PPINCIMP               Q10_8_Other
##   Less than $5,000               8
##   $5,000 to $7,499               1
##   $7,500 to $9,999               2
##   $10,000 to $12,499             5
##   $12,500 to $14,999             6
##   $15,000 to $19,999             2
##   $20,000 to $24,999            10
##   $25,000 to $29,999             5
##   $30,000 to $34,999             4
##   $35,000 to $39,999             9
##   $40,000 to $49,999             7
##   $50,000 to $59,999            15
##   $60,000 to $74,999            21
##   $75,000 to $84,999            13
##   $85,000 to $99,999             8
##   $100,000 to $124,999          21
##   $125,000 to $149,999          11
##   $150,000 to $174,999          12
##   $175,000 or more              12
## 
## , , Q10_r = Yes
## 
##                       Q10_q
## PPINCIMP               Q10_1_Bus Q10_2_Carpool Q10_3_Subway Q10_4_Train
##   Less than $5,000             8             0            0           1
##   $5,000 to $7,499             0             0            1           1
##   $7,500 to $9,999             1             0            1           2
##   $10,000 to $12,499           3             0            0           1
##   $12,500 to $14,999           6             0            1           0
##   $15,000 to $19,999           2             0            0           0
##   $20,000 to $24,999          10             4            0           1
##   $25,000 to $29,999           6             0            2           1
##   $30,000 to $34,999           3             0            1           0
##   $35,000 to $39,999           7             1            4           5
##   $40,000 to $49,999           4             0            1           2
##   $50,000 to $59,999          13             1            6           6
##   $60,000 to $74,999          19             5            6           3
##   $75,000 to $84,999          11             1            3           3
##   $85,000 to $99,999           5             0            6           3
##   $100,000 to $124,999        14             0            7           8
##   $125,000 to $149,999         7             0            5           2
##   $150,000 to $174,999        10             2            5           4
##   $175,000 or more             6             3            4           3
##                       Q10_q
## PPINCIMP               Q10_5_Taxi Q10_6_Airplane Q10_7_Don_t.know
##   Less than $5,000              1              0                0
##   $5,000 to $7,499              0              0                0
##   $7,500 to $9,999              1              0                0
##   $10,000 to $12,499            1              1                0
##   $12,500 to $14,999            0              0                0
##   $15,000 to $19,999            0              0                0
##   $20,000 to $24,999            3              1                0
##   $25,000 to $29,999            0              0                0
##   $30,000 to $34,999            0              0                0
##   $35,000 to $39,999            1              1                0
##   $40,000 to $49,999            0              0                0
##   $50,000 to $59,999            4              2                0
##   $60,000 to $74,999            0              0                0
##   $75,000 to $84,999            0              0                1
##   $85,000 to $99,999            2              1                0
##   $100,000 to $124,999          3              2                0
##   $125,000 to $149,999          1              1                0
##   $150,000 to $174,999          6              5                0
##   $175,000 or more              3              5                0
##                       Q10_q
## PPINCIMP               Q10_8_Other
##   Less than $5,000               0
##   $5,000 to $7,499               1
##   $7,500 to $9,999               0
##   $10,000 to $12,499             0
##   $12,500 to $14,999             0
##   $15,000 to $19,999             0
##   $20,000 to $24,999             2
##   $25,000 to $29,999             1
##   $30,000 to $34,999             1
##   $35,000 to $39,999             0
##   $40,000 to $49,999             0
##   $50,000 to $59,999             0
##   $60,000 to $74,999             1
##   $75,000 to $84,999             0
##   $85,000 to $99,999             0
##   $100,000 to $124,999           2
##   $125,000 to $149,999           0
##   $150,000 to $174,999           2
##   $175,000 or more               1

Q11. How do you rate your risk of getting influenza if you visited each of the following locations?

q11_long <- data2 %>%
  gather("Q11_q", "Q11_r", starts_with("Q11_"), -contains("Text"), -contains("Refused"), na.rm = TRUE)


with(q11_long, table(Q11_q, Q11_r))
##                              Q11_r
## Q11_q                         Don_t Know High Risk, Very Likely
##   Q11_1_Work                         185                    524
##   Q11_10_Family.or.friends           121                    541
##   Q11_11_Other                       915                     51
##   Q11_2_Schools                      178                    909
##   Q11_3_Day.care                     214                    924
##   Q11_4_Stores                       115                    551
##   Q11_5_Restaurants                  111                    483
##   Q11_6_Libraries                    169                    386
##   Q11_7_Hospitals                    123                    982
##   Q11_8_Doctor_s.office              110                    994
##   Q11_9_Public.transportation        147                   1093
##                              Q11_r
## Q11_q                         Low Risk, Not Likely
##   Q11_1_Work                                   643
##   Q11_10_Family.or.friends                     485
##   Q11_11_Other                                 104
##   Q11_2_Schools                                508
##   Q11_3_Day.care                               554
##   Q11_4_Stores                                 405
##   Q11_5_Restaurants                            442
##   Q11_6_Libraries                              700
##   Q11_7_Hospitals                              374
##   Q11_8_Doctor_s.office                        308
##   Q11_9_Public.transportation                  353
##                              Q11_r
## Q11_q                         Medium Risk, Somewhat Likely
##   Q11_1_Work                                           795
##   Q11_10_Family.or.friends                            1000
##   Q11_11_Other                                          54
##   Q11_2_Schools                                        551
##   Q11_3_Day.care                                       454
##   Q11_4_Stores                                        1076
##   Q11_5_Restaurants                                   1111
##   Q11_6_Libraries                                      890
##   Q11_7_Hospitals                                      669
##   Q11_8_Doctor_s.office                                733
##   Q11_9_Public.transportation                          551
q11 <- q11_long %>%
  count(Q11_q, Q11_r)

ggplot(q11[!is.na(q11$Q11_r), ], aes(x = Q11_r, y = n, fill = Q11_r)) +
  geom_bar(stat = 'identity', position = position_dodge()) + facet_wrap(~Q11_q) +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

# by gender
with(q11_long, table(PPGENDER, Q11_r, Q11_q))
## , , Q11_q = Q11_1_Work
## 
##         Q11_r
## PPGENDER Don_t Know High Risk, Very Likely Low Risk, Not Likely
##   Female         89                    309                  310
##   Male           96                    215                  333
##         Q11_r
## PPGENDER Medium Risk, Somewhat Likely
##   Female                          381
##   Male                            414
## 
## , , Q11_q = Q11_10_Family.or.friends
## 
##         Q11_r
## PPGENDER Don_t Know High Risk, Very Likely Low Risk, Not Likely
##   Female         53                    302                  229
##   Male           68                    239                  256
##         Q11_r
## PPGENDER Medium Risk, Somewhat Likely
##   Female                          506
##   Male                            494
## 
## , , Q11_q = Q11_11_Other
## 
##         Q11_r
## PPGENDER Don_t Know High Risk, Very Likely Low Risk, Not Likely
##   Female        449                     21                   53
##   Male          466                     30                   51
##         Q11_r
## PPGENDER Medium Risk, Somewhat Likely
##   Female                           27
##   Male                             27
## 
## , , Q11_q = Q11_2_Schools
## 
##         Q11_r
## PPGENDER Don_t Know High Risk, Very Likely Low Risk, Not Likely
##   Female         75                    500                  254
##   Male          103                    409                  254
##         Q11_r
## PPGENDER Medium Risk, Somewhat Likely
##   Female                          259
##   Male                            292
## 
## , , Q11_q = Q11_3_Day.care
## 
##         Q11_r
## PPGENDER Don_t Know High Risk, Very Likely Low Risk, Not Likely
##   Female         94                    498                  274
##   Male          120                    426                  280
##         Q11_r
## PPGENDER Medium Risk, Somewhat Likely
##   Female                          222
##   Male                            232
## 
## , , Q11_q = Q11_4_Stores
## 
##         Q11_r
## PPGENDER Don_t Know High Risk, Very Likely Low Risk, Not Likely
##   Female         45                    285                  206
##   Male           70                    266                  199
##         Q11_r
## PPGENDER Medium Risk, Somewhat Likely
##   Female                          553
##   Male                            523
## 
## , , Q11_q = Q11_5_Restaurants
## 
##         Q11_r
## PPGENDER Don_t Know High Risk, Very Likely Low Risk, Not Likely
##   Female         45                    266                  234
##   Male           66                    217                  208
##         Q11_r
## PPGENDER Medium Risk, Somewhat Likely
##   Female                          544
##   Male                            567
## 
## , , Q11_q = Q11_6_Libraries
## 
##         Q11_r
## PPGENDER Don_t Know High Risk, Very Likely Low Risk, Not Likely
##   Female         65                    213                  361
##   Male          104                    173                  339
##         Q11_r
## PPGENDER Medium Risk, Somewhat Likely
##   Female                          450
##   Male                            440
## 
## , , Q11_q = Q11_7_Hospitals
## 
##         Q11_r
## PPGENDER Don_t Know High Risk, Very Likely Low Risk, Not Likely
##   Female         52                    524                  179
##   Male           71                    458                  195
##         Q11_r
## PPGENDER Medium Risk, Somewhat Likely
##   Female                          335
##   Male                            334
## 
## , , Q11_q = Q11_8_Doctor_s.office
## 
##         Q11_r
## PPGENDER Don_t Know High Risk, Very Likely Low Risk, Not Likely
##   Female         41                    544                  138
##   Male           69                    450                  170
##         Q11_r
## PPGENDER Medium Risk, Somewhat Likely
##   Female                          365
##   Male                            368
## 
## , , Q11_q = Q11_9_Public.transportation
## 
##         Q11_r
## PPGENDER Don_t Know High Risk, Very Likely Low Risk, Not Likely
##   Female         61                    575                  173
##   Male           86                    518                  180
##         Q11_r
## PPGENDER Medium Risk, Somewhat Likely
##   Female                          279
##   Male                            272
q11 <- q11_long %>%
  group_by(PPGENDER, Q11_q, Q11_r) %>%
  count(PPGENDER, Q11_q, Q11_r)

ggplot(q11[!is.na(q11$Q11_r), ], aes(x = Q11_r, y = n, fill = PPGENDER)) +
  geom_bar(stat = 'identity', position = position_dodge()) + facet_wrap(~Q11_q) +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

# by ethnicity
with(q11_long, table(PPETHM, Q11_r, Q11_q))
## , , Q11_q = Q11_1_Work
## 
##                         Q11_r
## PPETHM                   Don_t Know High Risk, Very Likely
##   2+ Races, Non-Hispanic         11                     20
##   Black, Non-Hispanic            22                     42
##   Hispanic                       27                     59
##   Other, Non-Hispanic             6                     22
##   White, Non-Hispanic           119                    381
##                         Q11_r
## PPETHM                   Low Risk, Not Likely Medium Risk, Somewhat Likely
##   2+ Races, Non-Hispanic                   24                           24
##   Black, Non-Hispanic                      65                           64
##   Hispanic                                 61                           83
##   Other, Non-Hispanic                      25                           38
##   White, Non-Hispanic                     468                          586
## 
## , , Q11_q = Q11_10_Family.or.friends
## 
##                         Q11_r
## PPETHM                   Don_t Know High Risk, Very Likely
##   2+ Races, Non-Hispanic          7                     20
##   Black, Non-Hispanic            19                     53
##   Hispanic                       20                     68
##   Other, Non-Hispanic            10                     21
##   White, Non-Hispanic            65                    379
##                         Q11_r
## PPETHM                   Low Risk, Not Likely Medium Risk, Somewhat Likely
##   2+ Races, Non-Hispanic                   26                           26
##   Black, Non-Hispanic                      41                           80
##   Hispanic                                 37                          105
##   Other, Non-Hispanic                      26                           34
##   White, Non-Hispanic                     355                          755
## 
## , , Q11_q = Q11_11_Other
## 
##                         Q11_r
## PPETHM                   Don_t Know High Risk, Very Likely
##   2+ Races, Non-Hispanic         32                      1
##   Black, Non-Hispanic            90                      4
##   Hispanic                      103                     10
##   Other, Non-Hispanic            35                      2
##   White, Non-Hispanic           655                     34
##                         Q11_r
## PPETHM                   Low Risk, Not Likely Medium Risk, Somewhat Likely
##   2+ Races, Non-Hispanic                    4                            3
##   Black, Non-Hispanic                       7                            9
##   Hispanic                                 11                            8
##   Other, Non-Hispanic                       1                            1
##   White, Non-Hispanic                      81                           33
## 
## , , Q11_q = Q11_2_Schools
## 
##                         Q11_r
## PPETHM                   Don_t Know High Risk, Very Likely
##   2+ Races, Non-Hispanic          6                     34
##   Black, Non-Hispanic            27                     61
##   Hispanic                       22                    105
##   Other, Non-Hispanic             9                     45
##   White, Non-Hispanic           114                    664
##                         Q11_r
## PPETHM                   Low Risk, Not Likely Medium Risk, Somewhat Likely
##   2+ Races, Non-Hispanic                   21                           18
##   Black, Non-Hispanic                      62                           43
##   Hispanic                                 43                           59
##   Other, Non-Hispanic                      15                           22
##   White, Non-Hispanic                     367                          409
## 
## , , Q11_q = Q11_3_Day.care
## 
##                         Q11_r
## PPETHM                   Don_t Know High Risk, Very Likely
##   2+ Races, Non-Hispanic          7                     33
##   Black, Non-Hispanic            24                     63
##   Hispanic                       34                     98
##   Other, Non-Hispanic             9                     50
##   White, Non-Hispanic           140                    680
##                         Q11_r
## PPETHM                   Low Risk, Not Likely Medium Risk, Somewhat Likely
##   2+ Races, Non-Hispanic                   24                           15
##   Black, Non-Hispanic                      69                           37
##   Hispanic                                 46                           51
##   Other, Non-Hispanic                      15                           17
##   White, Non-Hispanic                     400                          334
## 
## , , Q11_q = Q11_4_Stores
## 
##                         Q11_r
## PPETHM                   Don_t Know High Risk, Very Likely
##   2+ Races, Non-Hispanic          5                     15
##   Black, Non-Hispanic            19                     58
##   Hispanic                       21                     74
##   Other, Non-Hispanic             9                     22
##   White, Non-Hispanic            61                    382
##                         Q11_r
## PPETHM                   Low Risk, Not Likely Medium Risk, Somewhat Likely
##   2+ Races, Non-Hispanic                   20                           39
##   Black, Non-Hispanic                      33                           83
##   Hispanic                                 33                          101
##   Other, Non-Hispanic                      22                           38
##   White, Non-Hispanic                     297                          815
## 
## , , Q11_q = Q11_5_Restaurants
## 
##                         Q11_r
## PPETHM                   Don_t Know High Risk, Very Likely
##   2+ Races, Non-Hispanic          6                     10
##   Black, Non-Hispanic            18                     56
##   Hispanic                       18                     70
##   Other, Non-Hispanic             8                     21
##   White, Non-Hispanic            61                    326
##                         Q11_r
## PPETHM                   Low Risk, Not Likely Medium Risk, Somewhat Likely
##   2+ Races, Non-Hispanic                   27                           36
##   Black, Non-Hispanic                      38                           81
##   Hispanic                                 33                          108
##   Other, Non-Hispanic                      21                           41
##   White, Non-Hispanic                     323                          845
## 
## , , Q11_q = Q11_6_Libraries
## 
##                         Q11_r
## PPETHM                   Don_t Know High Risk, Very Likely
##   2+ Races, Non-Hispanic          6                      7
##   Black, Non-Hispanic            23                     43
##   Hispanic                       22                     57
##   Other, Non-Hispanic             8                     16
##   White, Non-Hispanic           110                    263
##                         Q11_r
## PPETHM                   Low Risk, Not Likely Medium Risk, Somewhat Likely
##   2+ Races, Non-Hispanic                   36                           30
##   Black, Non-Hispanic                      64                           63
##   Hispanic                                 53                           97
##   Other, Non-Hispanic                      26                           41
##   White, Non-Hispanic                     521                          659
## 
## , , Q11_q = Q11_7_Hospitals
## 
##                         Q11_r
## PPETHM                   Don_t Know High Risk, Very Likely
##   2+ Races, Non-Hispanic          5                     32
##   Black, Non-Hispanic            18                     85
##   Hispanic                       16                    118
##   Other, Non-Hispanic             6                     48
##   White, Non-Hispanic            78                    699
##                         Q11_r
## PPETHM                   Low Risk, Not Likely Medium Risk, Somewhat Likely
##   2+ Races, Non-Hispanic                   18                           24
##   Black, Non-Hispanic                      44                           46
##   Hispanic                                 34                           62
##   Other, Non-Hispanic                      12                           25
##   White, Non-Hispanic                     266                          512
## 
## , , Q11_q = Q11_8_Doctor_s.office
## 
##                         Q11_r
## PPETHM                   Don_t Know High Risk, Very Likely
##   2+ Races, Non-Hispanic          5                     29
##   Black, Non-Hispanic            17                     81
##   Hispanic                       15                    108
##   Other, Non-Hispanic             6                     39
##   White, Non-Hispanic            67                    737
##                         Q11_r
## PPETHM                   Low Risk, Not Likely Medium Risk, Somewhat Likely
##   2+ Races, Non-Hispanic                   15                           30
##   Black, Non-Hispanic                      39                           56
##   Hispanic                                 28                           78
##   Other, Non-Hispanic                       9                           37
##   White, Non-Hispanic                     217                          532
## 
## , , Q11_q = Q11_9_Public.transportation
## 
##                         Q11_r
## PPETHM                   Don_t Know High Risk, Very Likely
##   2+ Races, Non-Hispanic          6                     33
##   Black, Non-Hispanic            22                     88
##   Hispanic                       20                    124
##   Other, Non-Hispanic             8                     51
##   White, Non-Hispanic            91                    797
##                         Q11_r
## PPETHM                   Low Risk, Not Likely Medium Risk, Somewhat Likely
##   2+ Races, Non-Hispanic                   15                           25
##   Black, Non-Hispanic                      41                           42
##   Hispanic                                 27                           57
##   Other, Non-Hispanic                      11                           21
##   White, Non-Hispanic                     259                          406
q11 <- q11_long %>%
  group_by(PPETHM, Q11_q, Q11_r) %>%
  count(PPETHM, Q11_q, Q11_r)

ggplot(q11[!is.na(q11$Q11_r), ], aes(x = Q11_r, y = n, fill = PPETHM)) +
  geom_bar(stat = 'identity', position = position_dodge()) + facet_wrap(~Q11_q) +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

# by income
with(q11_long, table(PPINCIMP, Q11_q, Q11_r))
## , , Q11_r = Don_t Know
## 
##                       Q11_q
## PPINCIMP               Q11_1_Work Q11_10_Family.or.friends Q11_11_Other
##   Less than $5,000             14                       14           22
##   $5,000 to $7,499              7                        5           15
##   $7,500 to $9,999              5                        2            4
##   $10,000 to $12,499            4                        4           25
##   $12,500 to $14,999            8                        8           20
##   $15,000 to $19,999           12                        8           29
##   $20,000 to $24,999           10                        7           27
##   $25,000 to $29,999           10                        3           41
##   $30,000 to $34,999           11                        6           42
##   $35,000 to $39,999           10                        6           39
##   $40,000 to $49,999            9                        8           71
##   $50,000 to $59,999           16                        7           75
##   $60,000 to $74,999           14                       10           91
##   $75,000 to $84,999           14                       10           73
##   $85,000 to $99,999            7                        3           58
##   $100,000 to $124,999         17                        9          146
##   $125,000 to $149,999          6                        4           61
##   $150,000 to $174,999          4                        1           25
##   $175,000 or more              7                        6           51
##                       Q11_q
## PPINCIMP               Q11_2_Schools Q11_3_Day.care Q11_4_Stores
##   Less than $5,000                15             14           12
##   $5,000 to $7,499                 5              6            5
##   $7,500 to $9,999                 4              4            3
##   $10,000 to $12,499               3              4            2
##   $12,500 to $14,999               7             10            6
##   $15,000 to $19,999              12             12           10
##   $20,000 to $24,999               7              8            5
##   $25,000 to $29,999               9             10            3
##   $30,000 to $34,999              10             11            6
##   $35,000 to $39,999              12             15            6
##   $40,000 to $49,999              11             10            7
##   $50,000 to $59,999              14             19            6
##   $60,000 to $74,999              18             19           12
##   $75,000 to $84,999              12             17            8
##   $85,000 to $99,999               5              6            3
##   $100,000 to $124,999            18             27           12
##   $125,000 to $149,999             6              7            4
##   $150,000 to $174,999             3              4            1
##   $175,000 or more                 7             11            4
##                       Q11_q
## PPINCIMP               Q11_5_Restaurants Q11_6_Libraries Q11_7_Hospitals
##   Less than $5,000                    13              15              15
##   $5,000 to $7,499                     5               5               5
##   $7,500 to $9,999                     3               3               3
##   $10,000 to $12,499                   2               3               3
##   $12,500 to $14,999                   6               7               4
##   $15,000 to $19,999                   8              12               9
##   $20,000 to $24,999                   4               6               5
##   $25,000 to $29,999                   3               8               6
##   $30,000 to $34,999                   7               8               7
##   $35,000 to $39,999                   7              11               8
##   $40,000 to $49,999                   5               8               6
##   $50,000 to $59,999                   9              14              10
##   $60,000 to $74,999                  10              13              12
##   $75,000 to $84,999                   5              12               4
##   $85,000 to $99,999                   2               5               2
##   $100,000 to $124,999                13              24              12
##   $125,000 to $149,999                 4               6               4
##   $150,000 to $174,999                 1               3               1
##   $175,000 or more                     4               6               7
##                       Q11_q
## PPINCIMP               Q11_8_Doctor_s.office Q11_9_Public.transportation
##   Less than $5,000                        14                          14
##   $5,000 to $7,499                         5                           5
##   $7,500 to $9,999                         3                           4
##   $10,000 to $12,499                       0                           2
##   $12,500 to $14,999                       3                           8
##   $15,000 to $19,999                       9                           9
##   $20,000 to $24,999                       4                           5
##   $25,000 to $29,999                       5                           7
##   $30,000 to $34,999                       8                           7
##   $35,000 to $39,999                       5                          10
##   $40,000 to $49,999                       6                           9
##   $50,000 to $59,999                      10                          16
##   $60,000 to $74,999                       9                          13
##   $75,000 to $84,999                       6                           7
##   $85,000 to $99,999                       1                           3
##   $100,000 to $124,999                     9                          16
##   $125,000 to $149,999                     4                           4
##   $150,000 to $174,999                     1                           1
##   $175,000 or more                         8                           7
## 
## , , Q11_r = High Risk, Very Likely
## 
##                       Q11_q
## PPINCIMP               Q11_1_Work Q11_10_Family.or.friends Q11_11_Other
##   Less than $5,000             11                       11            2
##   $5,000 to $7,499              5                        5            0
##   $7,500 to $9,999              1                        4            1
##   $10,000 to $12,499           14                       18            2
##   $12,500 to $14,999           11                       11            3
##   $15,000 to $19,999           14                       11            1
##   $20,000 to $24,999           12                       19            2
##   $25,000 to $29,999           33                       24            4
##   $30,000 to $34,999           24                       20            2
##   $35,000 to $39,999           32                       33            5
##   $40,000 to $49,999           37                       41            1
##   $50,000 to $59,999           33                       52            2
##   $60,000 to $74,999           61                       64            5
##   $75,000 to $84,999           43                       39            3
##   $85,000 to $99,999           40                       33            3
##   $100,000 to $124,999         86                       69           10
##   $125,000 to $149,999         26                       35            1
##   $150,000 to $174,999         21                       25            2
##   $175,000 or more             20                       27            2
##                       Q11_q
## PPINCIMP               Q11_2_Schools Q11_3_Day.care Q11_4_Stores
##   Less than $5,000                18             19           13
##   $5,000 to $7,499                 6              7            6
##   $7,500 to $9,999                 3              3            4
##   $10,000 to $12,499              24             24           21
##   $12,500 to $14,999              19             16           17
##   $15,000 to $19,999              28             28           18
##   $20,000 to $24,999              28             28           16
##   $25,000 to $29,999              45             43           31
##   $30,000 to $34,999              34             34           24
##   $35,000 to $39,999              44             38           32
##   $40,000 to $49,999              59             59           40
##   $50,000 to $59,999              81             81           45
##   $60,000 to $74,999              87             88           51
##   $75,000 to $84,999              69             68           48
##   $85,000 to $99,999              68             69           38
##   $100,000 to $124,999           143            145           60
##   $125,000 to $149,999            55             67           34
##   $150,000 to $174,999            41             44           23
##   $175,000 or more                57             63           30
##                       Q11_q
## PPINCIMP               Q11_5_Restaurants Q11_6_Libraries Q11_7_Hospitals
##   Less than $5,000                    11              10              19
##   $5,000 to $7,499                     6               5               7
##   $7,500 to $9,999                     3               3               5
##   $10,000 to $12,499                  15              14              25
##   $12,500 to $14,999                  13              10              24
##   $15,000 to $19,999                  16              11              30
##   $20,000 to $24,999                  14              10              34
##   $25,000 to $29,999                  29              20              44
##   $30,000 to $34,999                  22              21              36
##   $35,000 to $39,999                  29              26              47
##   $40,000 to $49,999                  34              24              66
##   $50,000 to $59,999                  33              32              79
##   $60,000 to $74,999                  52              40              96
##   $75,000 to $84,999                  45              30              74
##   $85,000 to $99,999                  34              30              73
##   $100,000 to $124,999                53              38             147
##   $125,000 to $149,999                26              23              69
##   $150,000 to $174,999                19              15              42
##   $175,000 or more                    29              24              65
##                       Q11_q
## PPINCIMP               Q11_8_Doctor_s.office Q11_9_Public.transportation
##   Less than $5,000                        20                          21
##   $5,000 to $7,499                         7                           9
##   $7,500 to $9,999                         3                           4
##   $10,000 to $12,499                      26                          22
##   $12,500 to $14,999                      21                          20
##   $15,000 to $19,999                      29                          30
##   $20,000 to $24,999                      34                          32
##   $25,000 to $29,999                      45                          54
##   $30,000 to $34,999                      40                          39
##   $35,000 to $39,999                      43                          53
##   $40,000 to $49,999                      74                          71
##   $50,000 to $59,999                      80                          92
##   $60,000 to $74,999                     105                         113
##   $75,000 to $84,999                      72                          90
##   $85,000 to $99,999                      74                          80
##   $100,000 to $124,999                   151                         165
##   $125,000 to $149,999                    66                          77
##   $150,000 to $174,999                    39                          50
##   $175,000 or more                        65                          71
## 
## , , Q11_r = Low Risk, Not Likely
## 
##                       Q11_q
## PPINCIMP               Q11_1_Work Q11_10_Family.or.friends Q11_11_Other
##   Less than $5,000             14                       11            3
##   $5,000 to $7,499              6                        2            1
##   $7,500 to $9,999              5                        2            1
##   $10,000 to $12,499           20                       11            5
##   $12,500 to $14,999           13                       10            3
##   $15,000 to $19,999           15                       15            0
##   $20,000 to $24,999           20                       11            3
##   $25,000 to $29,999           27                       22            8
##   $30,000 to $34,999           26                       24            6
##   $35,000 to $39,999           26                       20            7
##   $40,000 to $49,999           52                       35           12
##   $50,000 to $59,999           59                       43            7
##   $60,000 to $74,999           66                       39           11
##   $75,000 to $84,999           46                       32            3
##   $85,000 to $99,999           53                       41            9
##   $100,000 to $124,999         90                       88           14
##   $125,000 to $149,999         44                       27            4
##   $150,000 to $174,999         24                       20            3
##   $175,000 or more             37                       32            4
##                       Q11_q
## PPINCIMP               Q11_2_Schools Q11_3_Day.care Q11_4_Stores
##   Less than $5,000                 7              6            6
##   $5,000 to $7,499                 4              4            4
##   $7,500 to $9,999                 3              3            1
##   $10,000 to $12,499              19             19           12
##   $12,500 to $14,999              12             13            6
##   $15,000 to $19,999               8             13           10
##   $20,000 to $24,999              12             14           11
##   $25,000 to $29,999              25             29           22
##   $30,000 to $34,999              29             31           17
##   $35,000 to $39,999              31             32           15
##   $40,000 to $49,999              40             51           32
##   $50,000 to $59,999              45             48           36
##   $60,000 to $74,999              66             69           40
##   $75,000 to $84,999              33             34           27
##   $85,000 to $99,999              38             41           26
##   $100,000 to $124,999            73             77           68
##   $125,000 to $149,999            22             27           31
##   $150,000 to $174,999            16             17           17
##   $175,000 or more                25             26           24
##                       Q11_q
## PPINCIMP               Q11_5_Restaurants Q11_6_Libraries Q11_7_Hospitals
##   Less than $5,000                     4              10               6
##   $5,000 to $7,499                     3               5               2
##   $7,500 to $9,999                     2               0               1
##   $10,000 to $12,499                  12              18              10
##   $12,500 to $14,999                   6              13              10
##   $15,000 to $19,999                  11              19               5
##   $20,000 to $24,999                  14              22              12
##   $25,000 to $29,999                  23              35              23
##   $30,000 to $34,999                  19              31              19
##   $35,000 to $39,999                  20              27              26
##   $40,000 to $49,999                  33              56              34
##   $50,000 to $59,999                  42              61              29
##   $60,000 to $74,999                  38              77              38
##   $75,000 to $84,999                  25              54              29
##   $85,000 to $99,999                  31              43              24
##   $100,000 to $124,999                74             115              60
##   $125,000 to $149,999                37              41              17
##   $150,000 to $174,999                21              32              15
##   $175,000 or more                    27              41              14
##                       Q11_q
## PPINCIMP               Q11_8_Doctor_s.office Q11_9_Public.transportation
##   Less than $5,000                         5                           6
##   $5,000 to $7,499                         2                           2
##   $7,500 to $9,999                         1                           0
##   $10,000 to $12,499                       8                          16
##   $12,500 to $14,999                      11                           9
##   $15,000 to $19,999                       6                           9
##   $20,000 to $24,999                       9                           7
##   $25,000 to $29,999                      19                          20
##   $30,000 to $34,999                      15                          25
##   $35,000 to $39,999                      23                          18
##   $40,000 to $49,999                      24                          31
##   $50,000 to $59,999                      28                          34
##   $60,000 to $74,999                      34                          42
##   $75,000 to $84,999                      27                          23
##   $85,000 to $99,999                      21                          26
##   $100,000 to $124,999                    41                          46
##   $125,000 to $149,999                    14                          13
##   $150,000 to $174,999                    10                           8
##   $175,000 or more                        10                          18
## 
## , , Q11_r = Medium Risk, Somewhat Likely
## 
##                       Q11_q
## PPINCIMP               Q11_1_Work Q11_10_Family.or.friends Q11_11_Other
##   Less than $5,000             13                       16            2
##   $5,000 to $7,499              7                       13            2
##   $7,500 to $9,999              2                        5            1
##   $10,000 to $12,499           16                       22            0
##   $12,500 to $14,999           15                       18            0
##   $15,000 to $19,999           22                       29            2
##   $20,000 to $24,999           29                       34            2
##   $25,000 to $29,999           29                       50            2
##   $30,000 to $34,999           30                       41            2
##   $35,000 to $39,999           36                       45            6
##   $40,000 to $49,999           49                       63            3
##   $50,000 to $59,999           74                       80            4
##   $60,000 to $74,999           81                      109            7
##   $75,000 to $84,999           56                       78            3
##   $85,000 to $99,999           52                       75            8
##   $100,000 to $124,999        132                      158            4
##   $125,000 to $149,999         56                       66            2
##   $150,000 to $174,999         35                       38            3
##   $175,000 or more             61                       60            1
##                       Q11_q
## PPINCIMP               Q11_2_Schools Q11_3_Day.care Q11_4_Stores
##   Less than $5,000                12             13           21
##   $5,000 to $7,499                10              8           10
##   $7,500 to $9,999                 3              3            5
##   $10,000 to $12,499               9              8           20
##   $12,500 to $14,999               9              8           18
##   $15,000 to $19,999              15             10           25
##   $20,000 to $24,999              24             21           39
##   $25,000 to $29,999              20             17           43
##   $30,000 to $34,999              17             14           43
##   $35,000 to $39,999              17             19           51
##   $40,000 to $49,999              37             27           68
##   $50,000 to $59,999              42             34           95
##   $60,000 to $74,999              50             45          119
##   $75,000 to $84,999              45             40           76
##   $85,000 to $99,999              41             36           85
##   $100,000 to $124,999            91             76          185
##   $125,000 to $149,999            49             31           63
##   $150,000 to $174,999            24             19           43
##   $175,000 or more                36             25           67
##                       Q11_q
## PPINCIMP               Q11_5_Restaurants Q11_6_Libraries Q11_7_Hospitals
##   Less than $5,000                    24              17              12
##   $5,000 to $7,499                    11              10              11
##   $7,500 to $9,999                     6               6               3
##   $10,000 to $12,499                  25              21              18
##   $12,500 to $14,999                  22              17               9
##   $15,000 to $19,999                  28              21              19
##   $20,000 to $24,999                  39              33              20
##   $25,000 to $29,999                  44              36              26
##   $30,000 to $34,999                  42              30              29
##   $35,000 to $39,999                  48              40              23
##   $40,000 to $49,999                  75              59              41
##   $50,000 to $59,999                  98              75              64
##   $60,000 to $74,999                 122              91              76
##   $75,000 to $84,999                  84              63              52
##   $85,000 to $99,999                  85              74              53
##   $100,000 to $124,999               185             147             106
##   $125,000 to $149,999                65              62              42
##   $150,000 to $174,999                43              34              26
##   $175,000 or more                    65              54              39
##                       Q11_q
## PPINCIMP               Q11_8_Doctor_s.office Q11_9_Public.transportation
##   Less than $5,000                        13                          11
##   $5,000 to $7,499                        11                           9
##   $7,500 to $9,999                         5                           4
##   $10,000 to $12,499                      20                          13
##   $12,500 to $14,999                      12                          10
##   $15,000 to $19,999                      19                          15
##   $20,000 to $24,999                      24                          27
##   $25,000 to $29,999                      30                          18
##   $30,000 to $34,999                      27                          19
##   $35,000 to $39,999                      33                          23
##   $40,000 to $49,999                      43                          36
##   $50,000 to $59,999                      64                          40
##   $60,000 to $74,999                      74                          54
##   $75,000 to $84,999                      54                          39
##   $85,000 to $99,999                      56                          43
##   $100,000 to $124,999                   124                          98
##   $125,000 to $149,999                    48                          38
##   $150,000 to $174,999                    34                          25
##   $175,000 or more                        42                          29
q11 <- q11_long %>%
  group_by(PPINCIMP, Q11_q, Q11_r) %>%
  count(PPINCIMP, Q11_q, Q11_r)

ggplot(q11[!is.na(q11$Q11_r), ], aes(x = Q11_r, y = n, fill = PPINCIMP)) +
  geom_bar(stat = 'identity', position = position_dodge()) + facet_wrap(~Q11_q) +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Q12. Which of the following actions do you take to avoid getting sick?

Q12 <- data2 %>%
  select(PPGENDER, PPAGE, PPEDUC, PPETHM, PPINCIMP, PPWORK, 75:91) %>%
  gather("q", "r", 7:21)

with(Q12, table(q, r))
##                                                      r
## q                                                     Always Never
##   Q12_1_Avoid.touching.my.eyes                           653   324
##   Q12_10_Get.recommended.vaccine                        1041   564
##   Q12_11_Take.preventive.medicine                        425   831
##   Q12_12_Cover.my.nose.and.mouth.with.a.surgical.mask    218  1568
##   Q12_13_Avoid.contact.with.people.who.are.sick          765   153
##   Q12_14_Avoid.crowded.places                            406   413
##   Q12_15_Other                                            91   472
##   Q12_2_Avoid.touching.my.nose                           613   349
##   Q12_3_Avoid.touching.my.mouth                          758   300
##   Q12_4_Wash.my.hands.with.soap.more.often              1774    52
##   Q12_5_Use.hand.sanitizers                              911   278
##   Q12_6_Clean.the.surfaces.in.my.home                   1132   115
##   Q12_7_Clean.the.surfaces.at.work                       752   544
##   Q12_8_Eat.nutritious.food                              895   107
##   Q12_9_Get.adequate.rest                                899   114
##                                                      r
## q                                                     Sometimes
##   Q12_1_Avoid.touching.my.eyes                             1168
##   Q12_10_Get.recommended.vaccine                            540
##   Q12_11_Take.preventive.medicine                           890
##   Q12_12_Cover.my.nose.and.mouth.with.a.surgical.mask       358
##   Q12_13_Avoid.contact.with.people.who.are.sick            1228
##   Q12_14_Avoid.crowded.places                              1322
##   Q12_15_Other                                               87
##   Q12_2_Avoid.touching.my.nose                             1183
##   Q12_3_Avoid.touching.my.mouth                            1085
##   Q12_4_Wash.my.hands.with.soap.more.often                  317
##   Q12_5_Use.hand.sanitizers                                 957
##   Q12_6_Clean.the.surfaces.in.my.home                       899
##   Q12_7_Clean.the.surfaces.at.work                          842
##   Q12_8_Eat.nutritious.food                                1144
##   Q12_9_Get.adequate.rest                                  1130
q12 <- Q12 %>%
  count(q, r)

Q13. Do you get the flu vaccine?

with(data2, table(Q13))
## Q13
##       No, never Yes, every year Yes, some years 
##             819             908             423
ggplot(data2[!is.na(data2$Q13), ]) + geom_bar(mapping = aes(x = Q13, fill = Q13), position = position_dodge())

# by gender
with(data2, table(Q13, PPGENDER))
##                  PPGENDER
## Q13               Female Male
##   No, never          408  411
##   Yes, every year    460  448
##   Yes, some years    227  196
q13 <- data2 %>%
  count(Q13, PPGENDER)

ggplot(q13[!is.na(q13$Q13), ], aes(x = Q13, y = n, fill = PPGENDER)) +
  geom_bar(stat = 'identity', position = position_dodge())

# by eth
with(data2, table(Q13, PPINCIMP))
##                  PPINCIMP
## Q13               Less than $5,000 $5,000 to $7,499 $7,500 to $9,999
##   No, never                     33               11                6
##   Yes, every year               15                4                5
##   Yes, some years                4                9                2
##                  PPINCIMP
## Q13               $10,000 to $12,499 $12,500 to $14,999 $15,000 to $19,999
##   No, never                       24                 23                 34
##   Yes, every year                 21                 15                 23
##   Yes, some years                 11                  9                  5
##                  PPINCIMP
## Q13               $20,000 to $24,999 $25,000 to $29,999 $30,000 to $34,999
##   No, never                       37                 42                 36
##   Yes, every year                 24                 38                 35
##   Yes, some years                 11                 18                 21
##                  PPINCIMP
## Q13               $35,000 to $39,999 $40,000 to $49,999 $50,000 to $59,999
##   No, never                       46                 59                 70
##   Yes, every year                 41                 64                 80
##   Yes, some years                 17                 25                 33
##                  PPINCIMP
## Q13               $60,000 to $74,999 $75,000 to $84,999 $85,000 to $99,999
##   No, never                       88                 64                 42
##   Yes, every year                 88                 55                 76
##   Yes, some years                 45                 40                 34
##                  PPINCIMP
## Q13               $100,000 to $124,999 $125,000 to $149,999
##   No, never                        108                   38
##   Yes, every year                  148                   65
##   Yes, some years                   70                   29
##                  PPINCIMP
## Q13               $150,000 to $174,999 $175,000 or more
##   No, never                         24               34
##   Yes, every year                   45               66
##   Yes, some years                   15               25
q13 <- data2 %>%
  count(Q13, PPINCIMP)

ggplot(q13[!is.na(q13$Q13), ], aes(x = Q13, y = n, fill = PPINCIMP)) +
  geom_bar(stat = 'identity', position = position_dodge())

Q14. How much do you pay to get an influenza vaccine?

with(data2, table(Q14))
## Q14
##            $0    $30 to $60    Don_t know Less than $30 More than $60 
##           970            54            80           222             4
ggplot(data2[!is.na(data2$Q14), ]) + geom_bar(mapping = aes(x = Q14, fill = Q14), position = position_dodge())

# by gender
with(data2, by(Q14, PPGENDER, summary))
## PPGENDER: Female
##            $0    $30 to $60    Don_t know Less than $30 More than $60 
##           514            28            41           101             2 
##          NA's 
##           411 
## -------------------------------------------------------- 
## PPGENDER: Male
##            $0    $30 to $60    Don_t know Less than $30 More than $60 
##           456            26            39           121             2 
##          NA's 
##           427

Q15. Are you more likely to get a vaccine if others around you get a vaccine?

with(data2, table(Q15))
## Q15
##  No, less likely    No, no effect Yes, more likely 
##               70              878              381
ggplot(data2[!is.na(data2$Q15), ]) + geom_bar(mapping = aes(x = Q15, fill = Q15), position = position_dodge())

#
with(data2, table(Q15, PPGENDER))
##                   PPGENDER
## Q15                Female Male
##   No, less likely      31   39
##   No, no effect       477  401
##   Yes, more likely    179  202
#
with(data2, table(Q15, PPETHM))
##                   PPETHM
## Q15                2+ Races, Non-Hispanic Black, Non-Hispanic Hispanic
##   No, less likely                       2                  17       14
##   No, no effect                        21                  53       69
##   Yes, more likely                     14                  36       51
##                   PPETHM
## Q15                Other, Non-Hispanic White, Non-Hispanic
##   No, less likely                    5                  32
##   No, no effect                     27                 708
##   Yes, more likely                  32                 248
#
with(data2, table(PPINCIMP, Q15))
##                       Q15
## PPINCIMP               No, less likely No, no effect Yes, more likely
##   Less than $5,000                   3             6               10
##   $5,000 to $7,499                   2             6                5
##   $7,500 to $9,999                   1             4                2
##   $10,000 to $12,499                 5            16               11
##   $12,500 to $14,999                 0            13               10
##   $15,000 to $19,999                 1            15               12
##   $20,000 to $24,999                 0            25               10
##   $25,000 to $29,999                 4            34               17
##   $30,000 to $34,999                 2            39               15
##   $35,000 to $39,999                 3            38               17
##   $40,000 to $49,999                 5            58               26
##   $50,000 to $59,999                 8            78               27
##   $60,000 to $74,999                 9            85               39
##   $75,000 to $84,999                 4            67               24
##   $85,000 to $99,999                 5            79               26
##   $100,000 to $124,999               8           151               59
##   $125,000 to $149,999               6            60               28
##   $150,000 to $174,999               3            37               20
##   $175,000 or more                   1            67               23

Q16. Are you more likely to get a vaccine if others around you do not get a vaccine?

with(data2, table(Q16))
## Q16
##  No, less likely    No, no effect Yes, more likely 
##              101              904              313
ggplot(data2[!is.na(data2$Q16), ]) + geom_bar(mapping = aes(x = Q16, fill = Q16), position = position_dodge())

#
with(data2, table(Q16, PPGENDER))
##                   PPGENDER
## Q16                Female Male
##   No, less likely      43   58
##   No, no effect       472  432
##   Yes, more likely    162  151
#
with(data2, table(Q16, PPETHM))
##                   PPETHM
## Q16                2+ Races, Non-Hispanic Black, Non-Hispanic Hispanic
##   No, less likely                       3                  11       18
##   No, no effect                        23                  61       69
##   Yes, more likely                     12                  34       47
##                   PPETHM
## Q16                Other, Non-Hispanic White, Non-Hispanic
##   No, less likely                   11                  58
##   No, no effect                     30                 721
##   Yes, more likely                  22                 198
#
with(data2, table(PPINCIMP, Q16))
##                       Q16
## PPINCIMP               No, less likely No, no effect Yes, more likely
##   Less than $5,000                   2             8                9
##   $5,000 to $7,499                   3             7                3
##   $7,500 to $9,999                   0             4                3
##   $10,000 to $12,499                 3            18               11
##   $12,500 to $14,999                 4            10                9
##   $15,000 to $19,999                 0            16               12
##   $20,000 to $24,999                 4            21                8
##   $25,000 to $29,999                 2            34               20
##   $30,000 to $34,999                 3            41               11
##   $35,000 to $39,999                 5            37               16
##   $40,000 to $49,999                 9            54               24
##   $50,000 to $59,999                 9            77               26
##   $60,000 to $74,999                 9            97               27
##   $75,000 to $84,999                 8            65               21
##   $85,000 to $99,999                 7            83               19
##   $100,000 to $124,999              13           156               47
##   $125,000 to $149,999              11            65               17
##   $150,000 to $174,999               5            40               14
##   $175,000 or more                   4            71               16

Q17. Do you get a vaccine to protect yourself, protect others, or protect yourself and others?

with(data2, table(Q17))
## Q17
##            Protect myself Protect myself and others 
##                       381                       921 
##            Protect others 
##                        22
ggplot(data2[!is.na(data2$Q17), ]) + geom_bar(mapping = aes(x = Q17, fill = Q17), position = position_dodge())

#
with(data2, table(Q17, PPGENDER))
##                            PPGENDER
## Q17                         Female Male
##   Protect myself               175  206
##   Protect myself and others    500  421
##   Protect others                 9   13
#
with(data2, table(Q17, PPETHM))
##                            PPETHM
## Q17                         2+ Races, Non-Hispanic Black, Non-Hispanic
##   Protect myself                                 8                  32
##   Protect myself and others                     30                  69
##   Protect others                                 0                   2
##                            PPETHM
## Q17                         Hispanic Other, Non-Hispanic
##   Protect myself                  35                  15
##   Protect myself and others       93                  47
##   Protect others                   5                   2
##                            PPETHM
## Q17                         White, Non-Hispanic
##   Protect myself                            291
##   Protect myself and others                 682
##   Protect others                             13
#
with(data2, table(PPINCIMP, Q17))
##                       Q17
## PPINCIMP               Protect myself Protect myself and others
##   Less than $5,000                  7                        10
##   $5,000 to $7,499                  4                         9
##   $7,500 to $9,999                  2                         5
##   $10,000 to $12,499               10                        21
##   $12,500 to $14,999                4                        18
##   $15,000 to $19,999               11                        17
##   $20,000 to $24,999               13                        21
##   $25,000 to $29,999               19                        35
##   $30,000 to $34,999               16                        40
##   $35,000 to $39,999               14                        43
##   $40,000 to $49,999               20                        69
##   $50,000 to $59,999               29                        78
##   $60,000 to $74,999               38                        90
##   $75,000 to $84,999               30                        63
##   $85,000 to $99,999               31                        76
##   $100,000 to $124,999             63                       153
##   $125,000 to $149,999             29                        64
##   $150,000 to $174,999             14                        45
##   $175,000 or more                 27                        64
##                       Q17
## PPINCIMP               Protect others
##   Less than $5,000                  1
##   $5,000 to $7,499                  0
##   $7,500 to $9,999                  0
##   $10,000 to $12,499                1
##   $12,500 to $14,999                2
##   $15,000 to $19,999                0
##   $20,000 to $24,999                0
##   $25,000 to $29,999                2
##   $30,000 to $34,999                0
##   $35,000 to $39,999                1
##   $40,000 to $49,999                0
##   $50,000 to $59,999                4
##   $60,000 to $74,999                4
##   $75,000 to $84,999                2
##   $85,000 to $99,999                3
##   $100,000 to $124,999              2
##   $125,000 to $149,999              0
##   $150,000 to $174,999              0
##   $175,000 or more                  0

Q18. What are the reasons you would not get an influenza vaccine?

Q18 <- data2 %>%
  select(PPGENDER, PPAGE, PPEDUC, PPETHM, PPINCIMP, PPWORK, 97:108) %>%
  gather("q", "r", 7:Q18_10_Other)

with(Q18, table(q, r))
##                                                                  r
## q                                                                   No
##   Q18_1_The.vaccine.costs.too.much                                1132
##   Q18_10_Other                                                    1064
##   Q18_2_The.vaccine.is.not.very.effective.in.preventing.influenza  903
##   Q18_3_I.am.not.likely.to.get.influenza                           964
##   Q18_4_Do.not.know.where.to.get.vaccine                          1199
##   Q18_5_The.side.effect.of.the.vaccine.are.too.risky               958
##   Q18_6_I.am.allergic.to.some.of.the.ingredients.in.the.vaccine   1184
##   Q18_7_I.do.not.like.shots                                        976
##   Q18_8_I.just.don_t.get.around.to.doing.it                        878
##   Q18_9_I.have.to.travel.too.far.to.get.vaccine                   1216
##                                                                  r
## q                                                                  Yes
##   Q18_1_The.vaccine.costs.too.much                                 110
##   Q18_10_Other                                                     178
##   Q18_2_The.vaccine.is.not.very.effective.in.preventing.influenza  339
##   Q18_3_I.am.not.likely.to.get.influenza                           278
##   Q18_4_Do.not.know.where.to.get.vaccine                            43
##   Q18_5_The.side.effect.of.the.vaccine.are.too.risky               284
##   Q18_6_I.am.allergic.to.some.of.the.ingredients.in.the.vaccine     58
##   Q18_7_I.do.not.like.shots                                        266
##   Q18_8_I.just.don_t.get.around.to.doing.it                        364
##   Q18_9_I.have.to.travel.too.far.to.get.vaccine                     26
q18 <- Q18 %>%
  count(q, r)

Q19. Do you have health insurance?

with(data2, table(Q19))
## Q19
##   No  Yes 
##  154 1994
ggplot(data2[!is.na(data2$Q19), ]) + geom_bar(mapping = aes(x = Q19, fill = Q19), position = position_dodge())

#
with(data2, table(Q19, PPGENDER))
##      PPGENDER
## Q19   Female Male
##   No      60   94
##   Yes   1033  961
#
with(data2, table(Q19, PPETHM))
##      PPETHM
## Q19   2+ Races, Non-Hispanic Black, Non-Hispanic Hispanic
##   No                      10                  19       40
##   Yes                     69                 174      188
##      PPETHM
## Q19   Other, Non-Hispanic White, Non-Hispanic
##   No                    8                  77
##   Yes                  85                1478
#
with(data2, table(PPINCIMP, Q19))
##                       Q19
## PPINCIMP                No Yes
##   Less than $5,000      18  33
##   $5,000 to $7,499       5  20
##   $7,500 to $9,999       2  12
##   $10,000 to $12,499     8  48
##   $12,500 to $14,999    10  37
##   $15,000 to $19,999     8  54
##   $20,000 to $24,999    13  59
##   $25,000 to $29,999     7  91
##   $30,000 to $34,999    10  80
##   $35,000 to $39,999     8  96
##   $40,000 to $49,999    10 138
##   $50,000 to $59,999     7 176
##   $60,000 to $74,999    14 206
##   $75,000 to $84,999     9 151
##   $85,000 to $99,999     7 146
##   $100,000 to $124,999   7 318
##   $125,000 to $149,999   4 128
##   $150,000 to $174,999   2  81
##   $175,000 or more       5 120

Q20. How effective do you think the influenza vaccine is in protecting people from becoming sick with influenza?

with(data2, table(Q20))
## Q20
##                      Don_t know It varies from season to season 
##                             228                             433 
##                   Not effective              Somewhat effective 
##                             144                             961 
##                  Very effective 
##                             383
ggplot(data2[!is.na(data2$Q20), ]) + geom_bar(mapping = aes(x = Q20, fill = Q20), position = position_dodge())

#
with(data2, table(Q20, PPGENDER))
##                                  PPGENDER
## Q20                               Female Male
##   Don_t know                         110  118
##   It varies from season to season    243  190
##   Not effective                       73   71
##   Somewhat effective                 464  497
##   Very effective                     205  178
#
with(data2, table(Q20, PPETHM))
##                                  PPETHM
## Q20                               2+ Races, Non-Hispanic
##   Don_t know                                           9
##   It varies from season to season                     15
##   Not effective                                       11
##   Somewhat effective                                  30
##   Very effective                                      14
##                                  PPETHM
## Q20                               Black, Non-Hispanic Hispanic
##   Don_t know                                       34       35
##   It varies from season to season                  30       31
##   Not effective                                    14       21
##   Somewhat effective                               82      101
##   Very effective                                   34       41
##                                  PPETHM
## Q20                               Other, Non-Hispanic White, Non-Hispanic
##   Don_t know                                       15                 135
##   It varies from season to season                  24                 333
##   Not effective                                     4                  94
##   Somewhat effective                               36                 712
##   Very effective                                   14                 280
#
with(data2, table(PPINCIMP, Q20))
##                       Q20
## PPINCIMP               Don_t know It varies from season to season
##   Less than $5,000             18                               6
##   $5,000 to $7,499             10                               3
##   $7,500 to $9,999              5                               1
##   $10,000 to $12,499            6                               9
##   $12,500 to $14,999            5                              18
##   $15,000 to $19,999           12                              14
##   $20,000 to $24,999           10                              14
##   $25,000 to $29,999           12                              17
##   $30,000 to $34,999           19                              16
##   $35,000 to $39,999           16                              19
##   $40,000 to $49,999           12                              37
##   $50,000 to $59,999           15                              45
##   $60,000 to $74,999           28                              45
##   $75,000 to $84,999           17                              33
##   $85,000 to $99,999           10                              30
##   $100,000 to $124,999         15                              60
##   $125,000 to $149,999          9                              22
##   $150,000 to $174,999          2                              19
##   $175,000 or more              7                              25
##                       Q20
## PPINCIMP               Not effective Somewhat effective Very effective
##   Less than $5,000                 5                  9             14
##   $5,000 to $7,499                 0                  7              5
##   $7,500 to $9,999                 2                  4              2
##   $10,000 to $12,499               5                 28              8
##   $12,500 to $14,999               5                 10              9
##   $15,000 to $19,999               3                 23             10
##   $20,000 to $24,999               7                 26             15
##   $25,000 to $29,999               6                 47             16
##   $30,000 to $34,999               6                 35             14
##   $35,000 to $39,999               9                 37             23
##   $40,000 to $49,999              11                 59             28
##   $50,000 to $59,999              10                 75             38
##   $60,000 to $74,999              19                106             23
##   $75,000 to $84,999              14                 71             25
##   $85,000 to $99,999               6                 81             26
##   $100,000 to $124,999            24                165             62
##   $125,000 to $149,999             2                 71             28
##   $150,000 to $174,999             4                 38             20
##   $175,000 or more                 6                 69             17

Q21. Are influenza vaccines covered by your health insurance?

with(data2, table(Q21))
## Q21
##                             Don_t know 
##                                    500 
##                                     No 
##                                     55 
## Yes, but only part of the cost is paid 
##                                    153 
##             Yes, the full cost is paid 
##                                   1282
ggplot(data2[!is.na(data2$Q21), ]) + geom_bar(mapping = aes(x = Q21, fill = Q21), position = position_dodge())

#
with(data2, table(Q21, PPGENDER))
##                                         PPGENDER
## Q21                                      Female Male
##   Don_t know                                271  229
##   No                                         31   24
##   Yes, but only part of the cost is paid     60   93
##   Yes, the full cost is paid                670  612
#
with(data2, table(Q21, PPETHM))
##                                         PPETHM
## Q21                                      2+ Races, Non-Hispanic
##   Don_t know                                                 14
##   No                                                          2
##   Yes, but only part of the cost is paid                      4
##   Yes, the full cost is paid                                 49
##                                         PPETHM
## Q21                                      Black, Non-Hispanic Hispanic
##   Don_t know                                              34       51
##   No                                                       5        2
##   Yes, but only part of the cost is paid                  10       17
##   Yes, the full cost is paid                             124      118
##                                         PPETHM
## Q21                                      Other, Non-Hispanic
##   Don_t know                                              27
##   No                                                       2
##   Yes, but only part of the cost is paid                  10
##   Yes, the full cost is paid                              46
##                                         PPETHM
## Q21                                      White, Non-Hispanic
##   Don_t know                                             374
##   No                                                      44
##   Yes, but only part of the cost is paid                 112
##   Yes, the full cost is paid                             945
#
with(data2, table(PPINCIMP, Q21))
##                       Q21
## PPINCIMP               Don_t know  No
##   Less than $5,000             11   2
##   $5,000 to $7,499              6   0
##   $7,500 to $9,999              4   1
##   $10,000 to $12,499           10   3
##   $12,500 to $14,999           12   1
##   $15,000 to $19,999           24   2
##   $20,000 to $24,999           18   1
##   $25,000 to $29,999           27   1
##   $30,000 to $34,999           25   4
##   $35,000 to $39,999           25   1
##   $40,000 to $49,999           34   4
##   $50,000 to $59,999           40   6
##   $60,000 to $74,999           62   6
##   $75,000 to $84,999           39   2
##   $85,000 to $99,999           31   2
##   $100,000 to $124,999         68   9
##   $125,000 to $149,999         23   7
##   $150,000 to $174,999         12   1
##   $175,000 or more             29   2
##                       Q21
## PPINCIMP               Yes, but only part of the cost is paid
##   Less than $5,000                                          1
##   $5,000 to $7,499                                          0
##   $7,500 to $9,999                                          1
##   $10,000 to $12,499                                        1
##   $12,500 to $14,999                                        3
##   $15,000 to $19,999                                        1
##   $20,000 to $24,999                                        4
##   $25,000 to $29,999                                        7
##   $30,000 to $34,999                                        4
##   $35,000 to $39,999                                        7
##   $40,000 to $49,999                                       18
##   $50,000 to $59,999                                       13
##   $60,000 to $74,999                                       13
##   $75,000 to $84,999                                       12
##   $85,000 to $99,999                                        9
##   $100,000 to $124,999                                     26
##   $125,000 to $149,999                                      9
##   $150,000 to $174,999                                      7
##   $175,000 or more                                         17
##                       Q21
## PPINCIMP               Yes, the full cost is paid
##   Less than $5,000                             19
##   $5,000 to $7,499                             13
##   $7,500 to $9,999                              6
##   $10,000 to $12,499                           34
##   $12,500 to $14,999                           21
##   $15,000 to $19,999                           27
##   $20,000 to $24,999                           36
##   $25,000 to $29,999                           56
##   $30,000 to $34,999                           47
##   $35,000 to $39,999                           63
##   $40,000 to $49,999                           82
##   $50,000 to $59,999                          116
##   $60,000 to $74,999                          125
##   $75,000 to $84,999                           98
##   $85,000 to $99,999                          104
##   $100,000 to $124,999                        213
##   $125,000 to $149,999                         89
##   $150,000 to $174,999                         61
##   $175,000 or more                             72

Q22. Do you do any of the following when you have influenza symptoms?

Q22 <- data2 %>%
  select(PPGENDER, PPAGE, PPEDUC, PPETHM, PPINCIMP, PPWORK, 112:122) %>%
  gather("q", "r", 7:Q22_9_Other)

with(Q22, table(q, r))
##                                                                     r
## q                                                                    Always
##   Q22_1_Go.to.a.doctor_s.office.or.medical.clinic                       349
##   Q22_2_Decide.on.treatment.without.consulting.a.health.practitioner    335
##   Q22_3_Search.the.internet.for.a.treatment                             126
##   Q22_4_Get.adequate.sleep                                             1147
##   Q22_5_Eat.nutritious.food                                             909
##   Q22_6_Take-over-counter.medication.for.symptoms                       796
##   Q22_7_Take.an.antiviral.medicine                                      153
##   Q22_8_Take.no.action.to.treat.the.illness                              96
##   Q22_9_Other                                                            54
##                                                                     r
## q                                                                    Never
##   Q22_1_Go.to.a.doctor_s.office.or.medical.clinic                      552
##   Q22_2_Decide.on.treatment.without.consulting.a.health.practitioner   473
##   Q22_3_Search.the.internet.for.a.treatment                           1148
##   Q22_4_Get.adequate.sleep                                             115
##   Q22_5_Eat.nutritious.food                                            135
##   Q22_6_Take-over-counter.medication.for.symptoms                      210
##   Q22_7_Take.an.antiviral.medicine                                    1103
##   Q22_8_Take.no.action.to.treat.the.illness                           1199
##   Q22_9_Other                                                          448
##                                                                     r
## q                                                                    Sometimes
##   Q22_1_Go.to.a.doctor_s.office.or.medical.clinic                         1235
##   Q22_2_Decide.on.treatment.without.consulting.a.health.practitioner      1329
##   Q22_3_Search.the.internet.for.a.treatment                                861
##   Q22_4_Get.adequate.sleep                                                 875
##   Q22_5_Eat.nutritious.food                                               1091
##   Q22_6_Take-over-counter.medication.for.symptoms                         1130
##   Q22_7_Take.an.antiviral.medicine                                         877
##   Q22_8_Take.no.action.to.treat.the.illness                                839
##   Q22_9_Other                                                               38
q22 <- Q22 %>%
  count(q, r)

Q23. Which of the following actions do you take when you have influenza symptoms to avoid someone else from getting sick?

Q23 <- data2 %>%
  select(PPGENDER, PPAGE, PPEDUC, PPETHM, PPINCIMP, PPWORK, 123:Q23_11_Other) %>%
  gather("q", "r", 7:Q23_11_Other)

with(Q23, table(q, r))
##                                                        r
## q                                                       Always Never
##   Q23_1_Stand.away.from.people                            1006   135
##   Q23_10_Cover.my.nose.and.mouth.when.I.sneeze.or.cough   1717    81
##   Q23_11_Other                                              54   421
##   Q23_2_Avoid.public.places                                897   196
##   Q23_3_Avoid.public.transportation                       1342   245
##   Q23_4_Stay.at.home                                       869   163
##   Q23_5_Wash.my.hands.with.soap.more.often                1559    92
##   Q23_6_Use.hand.sanitizers                               1014   299
##   Q23_7_Clean.the.surfaces.in.my.home                     1151   153
##   Q23_8_Clean.the.surfaces.I.use.at.work                   856   508
##   Q23_9_Cover.my.nose.and.mouth.with.a.surgical.mask       267  1463
##                                                        r
## q                                                       Sometimes
##   Q23_1_Stand.away.from.people                                996
##   Q23_10_Cover.my.nose.and.mouth.when.I.sneeze.or.cough       341
##   Q23_11_Other                                                 28
##   Q23_2_Avoid.public.places                                  1044
##   Q23_3_Avoid.public.transportation                           550
##   Q23_4_Stay.at.home                                         1106
##   Q23_5_Wash.my.hands.with.soap.more.often                    488
##   Q23_6_Use.hand.sanitizers                                   825
##   Q23_7_Clean.the.surfaces.in.my.home                         832
##   Q23_8_Clean.the.surfaces.I.use.at.work                      772
##   Q23_9_Cover.my.nose.and.mouth.with.a.surgical.mask          409
q23 <- Q23 %>%
  count(q, r)

Q24. What sources of information do you recall hearing or seeing about influenza outbreaks?

Q24 <- data2 %>%
  select(PPGENDER, PPAGE, PPEDUC, PPETHM, PPINCIMP, PPWORK, 137:Q24_7_Refused) %>%
  gather("q", "r", 7:Q24_6_Other)

with(Q24, table(q, r))
##                                                       r
## q                                                        No  Yes
##   Q24_1_Print.media.such.as.newspapers.and.magazines   1460  708
##   Q24_2_Traditional.media.such.as.television.and.radio  811 1357
##   Q24_3_Social.media.such.as.internet.and.blogs        1680  488
##   Q24_4_Word.of.mouth                                  1213  955
##   Q24_5_None                                           1764  404
##   Q24_6_Other                                          2114   54
q24 <- Q24 %>%
  count(q, r)

Q25. If you received information from the news, internet or other public media that there was an influenza outbreak in your community would you do any of the following?

Q25 <- data2 %>%
  select(PPGENDER, PPAGE, PPEDUC, PPETHM, PPINCIMP, PPWORK, 145:Q25_11_Other) %>%
  gather("q", "r", 7:Q25_11_Other)

with(Q25, table(q, r))
##                                                        r
## q                                                       Always Never
##   Q25_1_Stand.away.from.people                             649   217
##   Q25_10_Cover.my.nose.and.mouth.when.I.sneeze.or.cough   1643    90
##   Q25_11_Other                                              32   393
##   Q25_2_Avoid.public.places                                648   270
##   Q25_3_Avoid.public.transportation                       1221   268
##   Q25_4_Stay.at.home                                       484   429
##   Q25_5_Wash.my.hands.with.soap.more.often                1477    99
##   Q25_6_Use.hand.sanitizers                               1077   257
##   Q25_7_Clean.the.surfaces.in.my.home                     1116   160
##   Q25_8_Clean.the.surfaces.I.use.at.work                   902   464
##   Q25_9_Cover.my.nose.and.mouth.with.a.surgical.mask       343  1286
##                                                        r
## q                                                       Sometimes
##   Q25_1_Stand.away.from.people                               1268
##   Q25_10_Cover.my.nose.and.mouth.when.I.sneeze.or.cough       399
##   Q25_11_Other                                                 21
##   Q25_2_Avoid.public.places                                  1217
##   Q25_3_Avoid.public.transportation                           643
##   Q25_4_Stay.at.home                                         1222
##   Q25_5_Wash.my.hands.with.soap.more.often                    554
##   Q25_6_Use.hand.sanitizers                                   799
##   Q25_7_Clean.the.surfaces.in.my.home                         857
##   Q25_8_Clean.the.surfaces.I.use.at.work                      766
##   Q25_9_Cover.my.nose.and.mouth.with.a.surgical.mask          505
q25 <- Q25 %>%
  count(q, r)

Q26. Does your household have children?

with(data2, table(Q26))
## Q26
##   No  Yes 
## 1570  576
ggplot(data2[!is.na(data2$Q26), ]) + geom_bar(mapping = aes(x = Q26, fill = Q26), position = position_dodge())

Q27. What actions do you take when a child in your household has influenza symptoms?

Q27 <- data2 %>%
  select(PPGENDER, PPAGE, PPEDUC, PPETHM, PPINCIMP, PPWORK, 159:Q27_4_Other) %>%
  gather("q", "r", 7:Q27_4_Other)

with(Q27, table(q, r))
##                                                             r
## q                                                            Always Never
##   Q27_1_Keep.the.child.away.from.the.others.in.the.residence    198    90
##   Q27_2_Keep.the.child.out.of.school-daycare                    377    46
##   Q27_3_Stop.child_s.social.activities.like.play.dates          388    41
##   Q27_4_Other                                                    12    93
##                                                             r
## q                                                            Sometimes
##   Q27_1_Keep.the.child.away.from.the.others.in.the.residence       285
##   Q27_2_Keep.the.child.out.of.school-daycare                       149
##   Q27_3_Stop.child_s.social.activities.like.play.dates             144
##   Q27_4_Other                                                       12
q27 <- Q27 %>%
  count(q, r)

Q28. Are you a single parent?

with(data2, table(Q28))
## Q28
##  No Yes 
## 490  86
ggplot(data2[!is.na(data2$Q28), ]) + geom_bar(mapping = aes(x = Q28, fill = Q28), position = position_dodge())

Q29. How do you care for a sick child?

Q29 <- data2 %>%
  select(PPGENDER, PPAGE, PPEDUC, PPETHM, PPINCIMP, PPWORK, 166:Q29_6_Other) %>%
  gather("q", "r", 7:Q29_6_Other)

with(Q29, table(q, r))
##                                                r
## q                                               Always Never Sometimes
##   Q29_1_A.parent.brings.the.child.to.work            7   438        41
##   Q29_2_A.parent.stays.home                        266    27       193
##   Q29_3_Another.adult.stays.home                    68   202       216
##   Q29_4_Send.the.child.to.school.sick                1   414        70
##   Q29_5_Take.the.child.to.a.relative.or.friends      8   292       186
##   Q29_6_Other                                        4    76         6
q29 <- Q29 %>%
  count(q, r)

Q30. How do you care for a sick child?

Q30 <- data2 %>%
  select(PPGENDER, PPAGE, PPEDUC, PPETHM, PPINCIMP, PPWORK, 174:Q30_6_Other) %>%
  gather("q", "r", 7:Q30_6_Other)

with(Q30, table(q, r))
##                                                r
## q                                               Always Never Sometimes
##   Q30_1_I.bring.the.child.to.work                    4    77         5
##   Q30_2_I.stay.home                                 34    10        42
##   Q30_3_Another.adult.stays.home                     9    25        52
##   Q30_4_Send.the.child.to.school.sick                3    60        23
##   Q30_5_Take.the.child.to.a.relative.or.friends      7    33        46
##   Q30_6_Other                                        1    14         3
q30 <- Q30 %>%
  count(q, r)

Q31. How many hours of screen time (time spent watching television, a computer, smartphone, iPad, etc.) do you spend each day on average when you are not sick? Enter 0 if none

with(data2, summary(Q31))
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.868   6.000  24.000      52
# by gender
with(data2, by(Q31, PPGENDER, summary))
## PPGENDER: Female
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.838   6.000  21.000      21 
## -------------------------------------------------------- 
## PPGENDER: Male
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.898   6.000  24.000      31
#
with(data2, by(Q31, PPETHM, summary))
## PPETHM: 2+ Races, Non-Hispanic
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   5.675   8.000  20.000       3 
## -------------------------------------------------------- 
## PPETHM: Black, Non-Hispanic
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   3.000   5.000   5.931   8.000  24.000       6 
## -------------------------------------------------------- 
## PPETHM: Hispanic
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   5.049   7.000  24.000       9 
## -------------------------------------------------------- 
## PPETHM: Other, Non-Hispanic
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.477   5.250  15.000       5 
## -------------------------------------------------------- 
## PPETHM: White, Non-Hispanic
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.693   6.000  22.000      29
#
with(data2, by(Q31, PPINCIMP, summary))
## PPINCIMP: Less than $5,000
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##     0.0     1.0     4.0     4.7     6.0    20.0       3 
## -------------------------------------------------------- 
## PPINCIMP: $5,000 to $7,499
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.750   4.000   5.458   7.250  20.000       1 
## -------------------------------------------------------- 
## PPINCIMP: $7,500 to $9,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   3.000   4.000   6.077  11.000  14.000       1 
## -------------------------------------------------------- 
## PPINCIMP: $10,000 to $12,499
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.855   7.000  16.000       1 
## -------------------------------------------------------- 
## PPINCIMP: $12,500 to $14,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   3.000   5.000   5.778   8.000  20.000       3 
## -------------------------------------------------------- 
## PPINCIMP: $15,000 to $19,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   5.129   6.000  24.000       1 
## -------------------------------------------------------- 
## PPINCIMP: $20,000 to $24,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   3.000   5.000   5.362   6.000  22.000       4 
## -------------------------------------------------------- 
## PPINCIMP: $25,000 to $29,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   3.000   4.500   5.184   6.000  18.000       1 
## -------------------------------------------------------- 
## PPINCIMP: $30,000 to $34,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.750   4.000   4.886   6.000  15.000       5 
## -------------------------------------------------------- 
## PPINCIMP: $35,000 to $39,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.832   7.000  18.000       3 
## -------------------------------------------------------- 
## PPINCIMP: $40,000 to $49,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   3.000   4.000   5.063   7.000  17.000       6 
## -------------------------------------------------------- 
## PPINCIMP: $50,000 to $59,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.608   6.000  20.000       3 
## -------------------------------------------------------- 
## PPINCIMP: $60,000 to $74,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.876   6.000  20.000       6 
## -------------------------------------------------------- 
## PPINCIMP: $75,000 to $84,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.335   5.750  16.000       2 
## -------------------------------------------------------- 
## PPINCIMP: $85,000 to $99,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    0.00    2.00    4.00    4.75    6.00   21.00       1 
## -------------------------------------------------------- 
## PPINCIMP: $100,000 to $124,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.975   7.000  24.000       4 
## -------------------------------------------------------- 
## PPINCIMP: $125,000 to $149,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   5.038   7.000  20.000       1 
## -------------------------------------------------------- 
## PPINCIMP: $150,000 to $174,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   1.000   2.000   4.000   4.659   6.000  20.000       3 
## -------------------------------------------------------- 
## PPINCIMP: $175,000 or more
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   3.000   4.366   6.000  15.000       3

Q32. How many hours of screen time do you spend each day on average when you are sick? Enter 0 if none

with(data2, summary(Q32))
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   1.000   4.000   4.267   6.000  24.000      61
# by gender
with(data2, by(Q32, PPGENDER, summary))
## PPGENDER: Female
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   1.000   4.000   4.181   6.000  24.000      29 
## -------------------------------------------------------- 
## PPGENDER: Male
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   1.000   4.000   4.355   6.000  24.000      32
#
with(data2, by(Q32, PPETHM, summary))
## PPETHM: 2+ Races, Non-Hispanic
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   5.000   5.416   8.000  20.000       3 
## -------------------------------------------------------- 
## PPETHM: Black, Non-Hispanic
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   1.000   3.000   4.524   7.000  24.000       6 
## -------------------------------------------------------- 
## PPETHM: Hispanic
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    0.00    1.00    3.00    4.17    6.00   20.00       8 
## -------------------------------------------------------- 
## PPETHM: Other, Non-Hispanic
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   1.000   2.000   3.102   4.250  12.000       5 
## -------------------------------------------------------- 
## PPETHM: White, Non-Hispanic
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   1.000   4.000   4.258   6.000  24.000      39
#
with(data2, by(Q32, PPINCIMP, summary))
## PPINCIMP: Less than $5,000
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   0.000   2.000   3.837   5.000  24.000       4 
## -------------------------------------------------------- 
## PPINCIMP: $5,000 to $7,499
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##    0.00    1.00    2.00    4.92    7.00   24.00 
## -------------------------------------------------------- 
## PPINCIMP: $7,500 to $9,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   0.000   2.000   3.667   7.250  12.000       2 
## -------------------------------------------------------- 
## PPINCIMP: $10,000 to $12,499
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   0.000   3.000   4.074   6.000  15.000       2 
## -------------------------------------------------------- 
## PPINCIMP: $12,500 to $14,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   1.000   2.500   3.935   5.750  20.000       2 
## -------------------------------------------------------- 
## PPINCIMP: $15,000 to $19,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   0.000   2.000   3.672   5.000  18.000       2 
## -------------------------------------------------------- 
## PPINCIMP: $20,000 to $24,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   5.000   5.074   8.000  20.000       5 
## -------------------------------------------------------- 
## PPINCIMP: $25,000 to $29,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    0.00    1.00    3.00    4.48    7.00   22.00       1 
## -------------------------------------------------------- 
## PPINCIMP: $30,000 to $34,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.159   6.250  12.000       5 
## -------------------------------------------------------- 
## PPINCIMP: $35,000 to $39,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   1.000   3.000   4.218   6.000  18.000       3 
## -------------------------------------------------------- 
## PPINCIMP: $40,000 to $49,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   1.000   3.000   3.958   6.000  16.000       5 
## -------------------------------------------------------- 
## PPINCIMP: $50,000 to $59,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   1.000   3.000   3.774   6.000  15.000       7 
## -------------------------------------------------------- 
## PPINCIMP: $60,000 to $74,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.387   6.000  20.000       7 
## -------------------------------------------------------- 
## PPINCIMP: $75,000 to $84,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   1.000   4.000   4.258   6.000  14.000       1 
## -------------------------------------------------------- 
## PPINCIMP: $85,000 to $99,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.282   6.000  21.000       4 
## -------------------------------------------------------- 
## PPINCIMP: $100,000 to $124,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.467   6.000  24.000       4 
## -------------------------------------------------------- 
## PPINCIMP: $125,000 to $149,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   5.000   4.656   6.000  20.000       1 
## -------------------------------------------------------- 
## PPINCIMP: $150,000 to $174,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.542   6.000  20.000       2 
## -------------------------------------------------------- 
## PPINCIMP: $175,000 or more
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    0.00    1.00    3.50    4.09    6.00   20.00       4

Q33. How many people, including yourself, reside in your household?

with(data2, summary(Q33))
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    1.00    2.00    2.00    2.58    3.00   14.00      28
# by gender
with(data2, by(Q33, PPGENDER, summary))
## PPGENDER: Female
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   1.000   2.000   2.000   2.567   3.000   9.000       8 
## -------------------------------------------------------- 
## PPGENDER: Male
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   1.000   2.000   2.000   2.594   3.000  14.000      20
#
with(data2, by(Q31, PPETHM, summary))
## PPETHM: 2+ Races, Non-Hispanic
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   5.675   8.000  20.000       3 
## -------------------------------------------------------- 
## PPETHM: Black, Non-Hispanic
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   3.000   5.000   5.931   8.000  24.000       6 
## -------------------------------------------------------- 
## PPETHM: Hispanic
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   5.049   7.000  24.000       9 
## -------------------------------------------------------- 
## PPETHM: Other, Non-Hispanic
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.477   5.250  15.000       5 
## -------------------------------------------------------- 
## PPETHM: White, Non-Hispanic
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.693   6.000  22.000      29
#
with(data2, by(Q31, PPINCIMP, summary))
## PPINCIMP: Less than $5,000
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##     0.0     1.0     4.0     4.7     6.0    20.0       3 
## -------------------------------------------------------- 
## PPINCIMP: $5,000 to $7,499
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.750   4.000   5.458   7.250  20.000       1 
## -------------------------------------------------------- 
## PPINCIMP: $7,500 to $9,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   3.000   4.000   6.077  11.000  14.000       1 
## -------------------------------------------------------- 
## PPINCIMP: $10,000 to $12,499
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.855   7.000  16.000       1 
## -------------------------------------------------------- 
## PPINCIMP: $12,500 to $14,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   3.000   5.000   5.778   8.000  20.000       3 
## -------------------------------------------------------- 
## PPINCIMP: $15,000 to $19,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   5.129   6.000  24.000       1 
## -------------------------------------------------------- 
## PPINCIMP: $20,000 to $24,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   3.000   5.000   5.362   6.000  22.000       4 
## -------------------------------------------------------- 
## PPINCIMP: $25,000 to $29,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   3.000   4.500   5.184   6.000  18.000       1 
## -------------------------------------------------------- 
## PPINCIMP: $30,000 to $34,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.750   4.000   4.886   6.000  15.000       5 
## -------------------------------------------------------- 
## PPINCIMP: $35,000 to $39,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.832   7.000  18.000       3 
## -------------------------------------------------------- 
## PPINCIMP: $40,000 to $49,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   3.000   4.000   5.063   7.000  17.000       6 
## -------------------------------------------------------- 
## PPINCIMP: $50,000 to $59,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.608   6.000  20.000       3 
## -------------------------------------------------------- 
## PPINCIMP: $60,000 to $74,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.876   6.000  20.000       6 
## -------------------------------------------------------- 
## PPINCIMP: $75,000 to $84,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.335   5.750  16.000       2 
## -------------------------------------------------------- 
## PPINCIMP: $85,000 to $99,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    0.00    2.00    4.00    4.75    6.00   21.00       1 
## -------------------------------------------------------- 
## PPINCIMP: $100,000 to $124,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   4.975   7.000  24.000       4 
## -------------------------------------------------------- 
## PPINCIMP: $125,000 to $149,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   4.000   5.038   7.000  20.000       1 
## -------------------------------------------------------- 
## PPINCIMP: $150,000 to $174,999
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   1.000   2.000   4.000   4.659   6.000  20.000       3 
## -------------------------------------------------------- 
## PPINCIMP: $175,000 or more
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   2.000   3.000   4.366   6.000  15.000       3

Household Members

HHM1

Q35. What is the gender of this member of the household? Remember, this relates to HHM1_Name who is HHM1_AGE years old.

with(data2, table(Q35))
## Q35
## Female   Male 
##    799    859

Q36. On average, how many days per week does this member of your household work or attend day care or school outside of your home?

with(data2, summary(Q36))
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   0.000   4.000   2.874   5.000   7.000     571

Q37. On average, how many days per week does this member of your household participate in social activities outside of your home?

with(data2, summary(Q37))
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   0.000   2.000   2.098   3.000   7.000     663

Q38. On average, how many days per week does this member of your household use public transportation?

with(data2, summary(Q38))
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##  0.0000  0.0000  0.0000  0.3909  0.0000  7.0000     582

Q39. How frequently does this member of your household visit a doctor’s office for wellness appointments?

with(data2, table(Q39))
## Q39
##              Don_t know Less than once per year More than once per year 
##                      84                     222                     593 
##                   Never           Once per year 
##                     100                     656

Q40. How frequently does this member of the household get sick in a typical year?

with(data2, table(Q40))
## Q40
##  1 to 2 times  3 to 5 times 6 to 10 times    Don_t know  More than 10 
##          1025           271            32            87            13 
##         Never 
##           226

Q41. How many times has this member of your household had influenza or another respiratory illness in the last two years?

with(data2, table(Q41))
## Q41
##     2 times     3 times  Don_t know More than 3       Never        Once 
##         191          60         158          39         807         400

Q42. Does this member of your household get an annual influenza vaccine?

with(data2, table(Q42))
## Q42
##     Don_t know      No, never    Yes, always Yes, sometimes 
##            166            567            661            263

HHM2

Q43. What is the gender of this member of the household? Remember, this relates to HHM1_Name who is HHM1_AGE years old.

with(data2, table(Q43))
## Q43
## Female   Male 
##    388    431

Q44. On average, how many days per week does this member of your household work or attend day care or school outside of your home?

with(data2, summary(Q44))
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   1.000   5.000   3.669   5.000   7.000    1383

Q45. On average, how many days per week does this member of your household participate in social activities outside of your home?

with(data2, summary(Q45))
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##   0.000   1.000   2.000   2.395   4.000   7.000    1419

Q46. On average, how many days per week does this member of your household use public transportation?

with(data2, summary(Q46))
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##  0.0000  0.0000  0.0000  0.5727  0.0000  7.0000    1391

Q47. How frequently does this member of your household visit a doctor’s office for wellness appointments?

with(data2, table(Q47))
## Q47
##              Don_t know Less than once per year More than once per year 
##                      55                     125                     232 
##                   Never           Once per year 
##                      59                     353

Q48. How frequently does this member of the household get sick in a typical year?

with(data2, table(Q48))
## Q48
##  1 to 2 times  3 to 5 times 6 to 10 times    Don_t know  More than 10 
##           490           153            25            66             7 
##         Never 
##            83

Q49. How many times has this member of your household had influenza or another respiratory illness in the last two years?

with(data2, table(Q49))
## Q49
##     2 times     3 times  Don_t know More than 3       Never        Once 
##          91          32          93          21         403         183

Q50. Does this member of your household get an annual influenza vaccine?

with(data2, table(Q50))
## Q50
##     Don_t know      No, never    Yes, always Yes, sometimes 
##            100            317            275            132